java.lang.IllegalStateException: reference.get() must not be null

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by LissF
, 1 year ago
reference.get() must not be null
via GitHub by LissF
, 1 year ago
java.lang.IllegalStateException: reference.get() must not be null
at com.github.nitrico.lastadapter.WeakReferenceOnListChangedCallback.getAdapter(WeakReferenceOnListChangedCallback.kt:30)
at com.github.nitrico.lastadapter.WeakReferenceOnListChangedCallback.onItemRangeRemoved(WeakReferenceOnListChangedCallback.kt:44)
at android.databinding.ListChangeRegistry$1.onNotifyCallback(ListChangeRegistry.java:54)
at android.databinding.ListChangeRegistry$1.onNotifyCallback(ListChangeRegistry.java:38)
at android.databinding.CallbackRegistry.notifyCallbacks(CallbackRegistry.java:201)
at android.databinding.CallbackRegistry.notifyFirst64(CallbackRegistry.java:122)
at android.databinding.CallbackRegistry.notifyRemainder(CallbackRegistry.java:169)
at android.databinding.CallbackRegistry.notifyRecurse(CallbackRegistry.java:145)
at android.databinding.CallbackRegistry.notifyCallbacks(CallbackRegistry.java:91)
at android.databinding.ListChangeRegistry.notifyCallbacks(ListChangeRegistry.java:135)
at android.databinding.ListChangeRegistry.notifyRemoved(ListChangeRegistry.java:118)
at android.databinding.ObservableArrayList.notifyRemove(ObservableArrayList.java:124)
at android.databinding.ObservableArrayList.clear(ObservableArrayList.java:79)
at my.package.view.MyFragment.onActivityCreated(MyFragment.java:90)
at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:2083)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1129)
at android.support.v4.app.FragmentManagerImpl.attachFragment(FragmentManager.java:1464)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:748)
at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1632)
at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:637)
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1237)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:668)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:630)
at android.support.design.widget.TabLayout$ViewPagerOnTabSelectedListener.onTabSelected(TabLayout.java:2156)
at android.support.design.widget.TabLayout.dispatchTabSelected(TabLayout.java:1138)
at android.support.design.widget.TabLayout.selectTab(TabLayout.java:1132)
at android.support.design.widget.TabLayout.selectTab(TabLayout.java:1105)
at android.support.design.widget.TabLayout$Tab.select(TabLayout.java:1396)
at android.support.design.widget.TabLayout$TabView.performClick(TabLayout.java:1501)
at android.view.View$PerformClick.run(View.java:19881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5294)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.