Google Analytics - Tracker Object from Activity

喜你入骨 提交于 2019-12-03 20:11:20

Cause:
The object returned by getApplication is android.app.Application, which throws a ClassCastException, as indicated by the following line in the logcat

06-11 11:49:59.510: E/AndroidRuntime(2917): Caused by: java.lang.ClassCastException: android.app.Application cannot be cast to kids.animals.fruits.objects.brain.puzzle.memory.game.free.AnalyticsSampleApp06-11

Solution:
This can be caused if your manifest doesn't contain the application element

<application android:name=".YourApplication"...
</application>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!