Skip to content Skip to sidebar Skip to footer

Android.app.application Cannot Be Cast To Com.example..analyticsapplication

I am new to android and in a process of adding google analytics to one of my application. I am getting the following error when running my application. android.app.Application can

Solution 1:

If you wish to replace the singleton Application instance with some subclass of Application, you need to have the android:name attribute of the <application> element of your manifest point to that subclass.

Solution 2:

Well I believe everything answered ahead of me is true but it is more important where you place the android:name attribute. Do this in your manifest <application android:name="com.yourwebsite.appname.SubApplication" >...</application> NOT

<application> android:name="com.yourwebsite.appname.SubApplication"
        ...</application>

Also do not add any more <application> tags use your original one!!

Post a Comment for "Android.app.application Cannot Be Cast To Com.example..analyticsapplication"