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>