The error states that the type of the object returned by getApplication
is android.app.Application
. A possible cause for this is that you failed to define the application in the manifest. Make sure that your manifest includes something in the lines of:
<application android:name=".MyApp"...
</application>
Another solution for older Android devices or emulators. You defined an application in the manifest:
<application
android:name=".MyApp"...
</application>
but you still have this problem?
Try to disable instant run:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With