java.lang.NullPointerException

Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference


Solutions on the web21603

Solution icon of github
via GitHub by tusharbhatta
, 8 months ago
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String, java.lang.String)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String, java.lang.String)' on a null object reference

Solution icon of github
via GitHub by gbtt
, 11 months ago
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Solution icon of web
Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference

Stack trace

  • java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference at beatbox.neelay.anotherbeat.Fragment.Songs.onCreateView(Songs.java:55) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2184) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298) at android.support.v4.app.FragmentManagerImpl.moveFragmentsToInvisible(FragmentManager.java:2323) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2136) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2092) at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1969) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:620) at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143) at com.antonyt.infiniteviewpager.InfinitePagerAdapter.finishUpdate(InfinitePagerAdapter.java:67) at android.support.v4.view.ViewPager.populate(ViewPager.java:1268) 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:18811) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:716) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:462) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:714) at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:786) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465) at android.widget.LinearLayout.measureVertical(LinearLayout.java:748) at android.widget.LinearLayout.onMeasure(LinearLayout.java:630) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465) at android.widget.LinearLayout.measureVertical(LinearLayout.java:748) at android.widget.LinearLayout.onMeasure(LinearLayout.java:630) at android.view.View.measure(View.java:18811) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5952) at android.widget.FrameLayout.onMeasure(FrameLayout.java:194) at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2645) at android.view.View.measure(View.java:18811) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2127) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1243) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1479) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1134) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6045) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860) at android.view.Choreographer.doCallbacks(Choreographer.java:672) at android.view.Choreographer.doFrame(Choreographer.java:608) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95)

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

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.