java.lang.NullPointerException

Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solutions on the web21086

  • Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  • Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  • Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference at android.os.Parcel.readException(Parcel.java:1626) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135) at android.content.ContentProviderProxy.query(ContentProviderNative.java:421) at android.content.ContentResolver.query(ContentResolver.java:493) at android.content.ContentResolver.query(ContentResolver.java:435) at locus.api.android.ActionTools.getLocusInfo(ActionTools.java:854) at locus.api.android.utils.LocusUtils.getActiveVersion(LocusUtils.java:321) at locus.api.android.utils.LocusUtils.getActiveVersion(LocusUtils.java:293) at cgeo.geocaching.apps.AbstractLocusApp.isInstalled(AbstractLocusApp.java:48) at cgeo.geocaching.apps.navi.NavigationAppFactory.getInstalledNavigationApps(NavigationAppFactory.java:206) at cgeo.geocaching.apps.navi.NavigationAppFactory.getNavigationAppForId(NavigationAppFactory.java:344) at cgeo.geocaching.apps.navi.NavigationAppFactory.getDefaultNavigationApplication(NavigationAppFactory.java:304) at cgeo.geocaching.apps.navi.NavigationAppFactory.getDefaultNavigationApplication(NavigationAppFactory.java:339) at cgeo.geocaching.CacheMenuHandler.onPrepareOptionsMenu(CacheMenuHandler.java:99) at cgeo.geocaching.CacheMenuHandler.addMenuItems(CacheMenuHandler.java:112) at cgeo.geocaching.CacheMenuHandler.addMenuItems(CacheMenuHandler.java:116) at cgeo.geocaching.CacheDetailActivity.onCreateOptionsMenu(CacheDetailActivity.java:570) at android.app.Activity.onCreatePanelMenu(Activity.java:2852) at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:262) at android.support.v7.app.ActionBarActivity.superOnCreatePanelMenu(ActionBarActivity.java:233) at android.support.v7.app.ActionBarActivityDelegateICS.onCreatePanelMenu(ActionBarActivityDelegateICS.java:146) at android.support.v7.app.ActionBarActivity.onCreatePanelMenu(ActionBarActivity.java:200) at android.support.v7.app.ActionBarActivityDelegateICS$WindowCallbackWrapper.onCreatePanelMenu(ActionBarActivityDelegateICS.java:293) at com.android.internal.policy.PhoneWindow.preparePanel(PhoneWindow.java:617) at com.android.internal.policy.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:989) at com.android.internal.policy.PhoneWindow$1.run(PhoneWindow.java:320) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:603) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5461) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    4 times, 6 days ago
    2 times, 3 weeks ago
    2 times, 1 month ago
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    56 more bugmates