I use Google Analytics in my Android App and it works well. After updating the SDK (google play service) to the current version (6587000) the app hangs up at startup at following line 8 of 10 times:
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
There is no error in console. I added Achievements and Leaderboards too, but Analytics is called first. I also changed the context, but that works sometimes and sometimes not.
The only time I get a reproducable result is, when I remove following lines from AndroidManifest.xml. Then there is no freeze at startup anymore.
<meta-data
android:name="com.google.android.gms.analytics.globalConfigResource"
android:resource="@xml/analytics_global_config" />
But my configuration is correct:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="ga_appName">TestAppName</string>
<string name="ga_appVersion">Version1.0</string>
<string name="ga_logLevel">verbose</string>
<integer name="ga_dispatchPeriod">1000</integer>
<bool name="ga_dryRun">true</bool>
</resources>
And if I change the configuration there is the same result: 8 of 10 times the App freezes at startup.
Does someone have a clue what the problem is or what else I can check to make my app running again without freezing at startup?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…