You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently I migrated to AndroidX in one of my project. App is crashing when I press back button from the activity in which I used SlidingMenu.
I am getting NullPointerException in onKeyUp function of SlidingFragmentActivity
at com.jeremyfeinstein.slidingmenu.lib.app.SlidingFragmentActivity.onKeyUp(SlidingFragmentActivity.java:149)
Here is the error
java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.fragment.app.FragmentManagerImpl.dispatchDestroy()' on a null object reference at androidx.fragment.app.Fragment.performDestroy(Fragment.java:2825) at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1028) at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238) at androidx.fragment.app.BackStackRecord.executePopOps(BackStackRecord.java:496) at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2076) at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869) at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824) at androidx.fragment.app.FragmentManagerImpl.popBackStackImmediate(FragmentManagerImpl.java:310) at androidx.fragment.app.FragmentManagerImpl.popBackStackImmediate(FragmentManagerImpl.java:253) at androidx.fragment.app.FragmentManagerImpl.handleOnBackPressed(FragmentManagerImpl.java:233) at androidx.fragment.app.FragmentManagerImpl$1.handleOnBackPressed(FragmentManagerImpl.java:108) at androidx.activity.OnBackPressedDispatcher.onBackPressed(OnBackPressedDispatcher.java:189) at androidx.activity.ComponentActivity.onBackPressed(ComponentActivity.java:286) at net.wadic.myhospital.DrawerActivity.onBackPressed(DrawerActivity.java:280) at android.app.Activity.onKeyUp(Activity.java:3147) at com.jeremyfeinstein.slidingmenu.lib.app.SlidingFragmentActivity.onKeyUp(SlidingFragmentActivity.java:149) at android.view.KeyEvent.dispatch(KeyEvent.java:2739) at android.app.Activity.dispatchKeyEvent(Activity.java:3430) at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:115) at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84) at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:133) at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:558) at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59) at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:2814) at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:352) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5233) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5101) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4620) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4673) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4639) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4779) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4647) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4836) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4620) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4673) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4639) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4647) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4620) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4673) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4639) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4812) at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:4975) at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2580) at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2090) 2020-01-30 00:52:56.612 21593-21593/net.wadic.myhospital.dev E/AndroidRuntime: at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2081) at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2557) at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:326) at android.os.Looper.loop(Looper.java:165) at android.app.ActivityThread.main(ActivityThread.java:6806) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Does anyone know what should I do to get rid of this error ?
The text was updated successfully, but these errors were encountered:
Recently I migrated to AndroidX in one of my project. App is crashing when I press back button from the activity in which I used SlidingMenu.
I am getting NullPointerException in onKeyUp function of SlidingFragmentActivity
at com.jeremyfeinstein.slidingmenu.lib.app.SlidingFragmentActivity.onKeyUp(SlidingFragmentActivity.java:149)
Here is the error
java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.fragment.app.FragmentManagerImpl.dispatchDestroy()' on a null object reference at androidx.fragment.app.Fragment.performDestroy(Fragment.java:2825) at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1028) at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238) at androidx.fragment.app.BackStackRecord.executePopOps(BackStackRecord.java:496) at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2076) at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869) at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824) at androidx.fragment.app.FragmentManagerImpl.popBackStackImmediate(FragmentManagerImpl.java:310) at androidx.fragment.app.FragmentManagerImpl.popBackStackImmediate(FragmentManagerImpl.java:253) at androidx.fragment.app.FragmentManagerImpl.handleOnBackPressed(FragmentManagerImpl.java:233) at androidx.fragment.app.FragmentManagerImpl$1.handleOnBackPressed(FragmentManagerImpl.java:108) at androidx.activity.OnBackPressedDispatcher.onBackPressed(OnBackPressedDispatcher.java:189) at androidx.activity.ComponentActivity.onBackPressed(ComponentActivity.java:286) at net.wadic.myhospital.DrawerActivity.onBackPressed(DrawerActivity.java:280) at android.app.Activity.onKeyUp(Activity.java:3147) at com.jeremyfeinstein.slidingmenu.lib.app.SlidingFragmentActivity.onKeyUp(SlidingFragmentActivity.java:149) at android.view.KeyEvent.dispatch(KeyEvent.java:2739) at android.app.Activity.dispatchKeyEvent(Activity.java:3430) at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:115) at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84) at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:133) at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:558) at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59) at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:2814) at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:352) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5233) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5101) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4620) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4673) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4639) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4779) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4647) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4836) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4620) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4673) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4639) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4647) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4620) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4673) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4639) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4812) at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:4975) at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2580) at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2090) 2020-01-30 00:52:56.612 21593-21593/net.wadic.myhospital.dev E/AndroidRuntime: at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2081) at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2557) at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:326) at android.os.Looper.loop(Looper.java:165) at android.app.ActivityThread.main(ActivityThread.java:6806) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Does anyone know what should I do to get rid of this error ?
The text was updated successfully, but these errors were encountered: