我正在创建一个应用程序,我想在其中查看 google 分析帐户的崩溃和异常报告。
我为此功能使用以下代码:
“analytics_global_config.xml”
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="ga_appName">app_name</string>
<string name="ga_logLevel">verbose</string>
<integer name="ga_dispatchPeriod">1</integer>
<bool name="ga_dryRun">true</bool>
</resources>
我在清单文件中声明了这个 xml,如下所示:
<meta-data
android:name="com.google.android.gms.analytics.globalConfigResource"
android:resource="@xml/analytic_global_config" />
用于跟踪的 xml 文件:“analytics_track.xml”,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="TypographyDashes">
<string name="ga_trackingId">UA-XXXXXXXX-1
</string>
<bool name="ga_autoActivityTracking">true
</bool>
<bool name="ga_reportUncaughtExceptions">true
</bool>
<string name="ga_sampleFrequency">99.8</string>
<integer name="ga_sessionTimeout">2000</integer>
<bool name="ga_anonymizeIp">true</bool>
在应用程序类中,我使用了以下代码:
Tracker tracker = GoogleAnalytics.getInstance(this).(R.xml.analytics_track);
我正在登录应用程序的启动为:
09-23 16:26:57.775: V/GAV4(7763): Thread[main,5,main]: Loading Tracker config values.
09-23 16:26:57.775: V/GAV4(7763): Thread[main,5,main]: [Tracker] trackingId loaded: UA- 54498004-1
09-23 16:26:57.775: V/GAV4(7763): Thread[main,5,main]: [Tracker] sample frequency loaded: 99.8
09-23 16:26:57.775: V/GAV4(7763): Thread[main,5,main]: [Tracker] session timeout loaded: 2000000
09-23 16:26:57.775: V/GAV4(7763): Thread[main,5,main]: [Tracker] auto activity tracking loaded: true
09-23 16:26:57.775: V/GAV4(7763): Thread[client_id_fetcher,5,main]: Loaded client id from disk.
09-23 16:26:57.775: V/GAV4(7763): Thread[main,5,main]: [Tracker] anonymize ip loaded: true
09-23 16:26:57.775: V/GAV4(7763): Thread[main,5,main]: [Tracker] anonymize ip loaded: false
09-23 16:26:57.785: V/GAV4(7763): Thread[main,5,main]: ExceptionReporter created, original handler is com.android.internal.os.RuntimeInit$UncaughtHandler
09-23 16:26:57.785: V/GAV4(7763): Thread[main,5,main]: Uncaught exceptions will be reported to Google Analytics.
09-23 16:27:02.895: V/GAV4(7763): Thread[GAThread,5,main]: connecting to Analytics service
09-23 16:27:02.985: V/GAV4(7763): Thread[main,5,main]: service connected, binder: android.os.BinderProxy@41ae4840
09-23 16:27:02.985: V/GAV4(7763): Thread[main,5,main]: bound to service
09-23 16:27:03.015: V/GAV4(7763): Thread[GAThread,5,main]: connect: bindService returned true for Intent { act=com.google.android.gms.analytics.service.START cmp=com.google.android.gms/.analytics.service.AnalyticsService (has extras) }
09-23 16:27:03.055: V/GAV4(7763): Thread[main,5,main]: Connected to service
09-23 16:27:03.445: I/GAV4(7763): Thread[GAThread,5,main]: No campaign data found.
09-23 16:27:03.445: V/GAV4(7763): Thread[GAThread,5,main]: Initialized GA Thread
-一段时间后”
09-23 16:32:04.910: V/GAV4(7763): Thread[disconnect check,5,main]: Disconnecting due to inactivity
09-23 16:32:04.920: V/GAV4(7763): Thread[disconnect check,5,main]: Disconnected from service
但问题是它没有给出未捕获的崩溃和异常。我手动进行接收,异常后我得到以下日志:
09-23 16:32:22.770: V/GAV4(7763): Thread[main,5,main]: Tracking Exception: ActivityNotFoundException (@FullVideoActivity:onCompletion:276) {main}
09-23 16:32:22.770: V/GAV4(7763): Thread[main,5,main]: Dispatch call queued. Dispatch will run once initialization is complete.
09-23 16:32:22.770: V/GAV4(7763): Thread[main,5,main]: Passing exception to original handler.
我没有在谷歌分析帐户上遇到任何异常和崩溃。谁能帮我解决这个问题?
谢谢伊山耆那教