简体   繁体   English

Google Analytics在启动时失败

[英]Google Analytics fails on startup

I follow the tutorial on enabling Google Analytics for one of my apps. 我按照有关为我的某个应用启用Google Analytics的教程。 This seems to work fine for API level 17 and a Samsung Galaxy 4. 这似乎适用于API级别17和三星Galaxy 4。

However, when installing the app on an old API Level 4 G1, the app fails with the following error: 但是,在旧的API Level 4 G1上安装应用程序时,应用程序失败并显示以下错误:

Uncaught handler: thread client_id_fetcher exiting due to uncaught exception
java.lang.NullPointerException
  at android.app.ApplicationContext.openFileOutput(ApplicationContext.java:405)
  at android.content.ContextWrapper.openFileOutput(ContextWrapper.java:158)
  at com.google.analytics.tracking.android.ClientIdDefaultProvider.storeClientId(ClientIdDefaultProvider.java:102)
  at com.google.analytics.tracking.android.ClientIdDefaultProvider.generateClientId(ClientIdDefaultProvider.java:123)
  at com.google.analytics.tracking.android.ClientIdDefaultProvider.initializeClientId(ClientIdDefaultProvider.java:179)
  at com.google.analytics.tracking.android.ClientIdDefaultProvider$1.run(ClientIdDefaultProvider.java:134)

Are there API level requirements for Google Analytics for Android? Google Analytics for Android是否有API级别要求?

Google Analytics V2和新版V3 Beta附带的自述文件均指出最低SDK为2.1(v7)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM