java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Download the Android SDK: octobre 2015
    via by Unknown author,
  • Android service in Chat App Crashes
    via Stack Overflow by Liel Azulay
    ,
    • java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference at android.content.ContextWrapper.getPackageName(ContextWrapper.java:133) at android.preference.PreferenceManager.getDefaultSharedPreferencesName(PreferenceManager.java:390) at android.preference.PreferenceManager.getDefaultSharedPreferences(PreferenceManager.java:385) at dagger.module.AppModule.providesSharedPreference(AppModule.java:34) at dagger.module.AppModule_ProvidesSharedPreferenceFactory.get(AppModule_ProvidesSharedPreferenceFactory.java:23) at dagger.module.AppModule_ProvidesSharedPreferenceFactory.get(AppModule_ProvidesSharedPreferenceFactory.java:8) at dagger.internal.ScopedProvider.get(ScopedProvider.java:47) at ui.DisplayFragment_MembersInjector.injectMembers(DisplayFragment_MembersInjector.java:29) at ui.DisplayFragment_MembersInjector.injectMembers(DisplayFragment_MembersInjector.java:8) at dagger.component.DaggerAppComponent.inject(DaggerAppComponent.java:45) at ui.DisplayFragment.<init>(DisplayFragment.java:37) at ui.DisplayFragment.newInstance(DisplayFragment.java:41) at ui.MainActivity$MyPagerAdapter.getItem(MainActivity.java:86) at android.support.v4.app.FragmentPagerAdapter.instantiateItem(FragmentPagerAdapter.java:101) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1034) at android.support.v4.view.ViewPager.populate(ViewPager.java:1182) at android.support.v4.view.ViewPager.populate(ViewPager.java:1116) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1642) at android.view.View.measure(View.java:19324) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:825) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:511) at android.view.View.measure(View.java:19324) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113) at android.widget.FrameLayout.onMeasure(FrameLayout.java:223) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139) at android.view.View.measure(View.java:19324) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:393) at android.view.View.measure(View.java:19324) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113) at android.widget.FrameLayout.onMeasure(FrameLayout.java:223) at android.view.View.measure(View.java:19324) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723) at android.widget.LinearLayout.measureVertical(LinearLayout.java:788) at android.widget.LinearLayout.onMeasure(LinearLayout.java:648) at android.view.View.measure(View.java:19324) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113) at android.widget.FrameLayout.onMeasure(FrameLayout.java:223) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2694) at android.view.View.measure(View.java:19324) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2545) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1454) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1709) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1335) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6816) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:894) at android.view.Choreographer.doCallbacks(Choreographer.java:696) at android.view.Choreographer.doFrame(Choreographer.java:631) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:880) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5896)

    Users with the same issue

    Indri YunitaIndri Yunita
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    ivotje50ivotje50
    2 times, last one,
    Mihail MelnicMihail Melnic
    2 times, last one,
    MacaponMacapon
    306 times, last one,
    14 more bugmates