My app crashes whenever i press the back button or the menu button. I'm using androidx and kotlin. Below is my logcat
07-06 18:47:25.538 22303-22303/com.mnkafe.mnkafe E/InputEventSender: Exception dispatching finished signal. 07-06 18:47:25.538 22303-22303/com.mnkafe.mnkafe E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback 07-06 18:47:25.558 22303-22303/com.mnkafe.mnkafe E/MessageQueue-JNI: java.lang.NoSuchMethodError: No static method dispatchUnhandledKeyEventPre(Landroid/view/View;Landroid/view/KeyEvent;)Z in class Landroidx/core/view/ViewCompat; or its super classes (declaration of 'androidx.core.view.ViewCompat' appears in /data/app/com.mnkafe.mnkafe-2/split_lib_dependencies_apk.apk) at androidx.appcompat.app.AppCompatDelegateImpl.dispatchKeyEvent(AppCompatDelegateImpl.java:1162) at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:2529) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2301) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4032) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3987) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3549) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3602) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3568) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3685) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3576) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3742) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3549) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3602) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3568) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3576) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3549) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3602) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3568) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3718) at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3879) at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2242) at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1879) at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1870) at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2219) at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:143) at android.os.Looper.loop(Looper.java:122) at android.app.ActivityThread.main(ActivityThread.java:5348) 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:947) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742) 07-06 18:47:25.558 22303-22303/com.mnkafe.mnkafe D/AndroidRuntime: Shutting down VM 07-06 18:47:25.568 22303-22303/com.mnkafe.mnkafe E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mnkafe.mnkafe, PID: 22303 java.lang.NoSuchMethodError: No static method dispatchUnhandledKeyEventPre(Landroid/view/View;Landroid/view/KeyEvent;)Z in class Landroidx/core/view/ViewCompat; or its super classes (declaration of 'androidx.core.view.ViewCompat' appears in /data/app/com.mnkafe.mnkafe-2/split_lib_dependencies_apk.apk) at androidx.appcompat.app.AppCompatDelegateImpl.dispatchKeyEvent(AppCompatDelegateImpl.java:1162) at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:2529) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2301) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4032) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3987) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3549) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3602) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3568) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3685) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3576) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3742) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3549) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3602) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3568) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3576) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3549) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3602) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3568) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3718) at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3879) at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2242) at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1879) at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1870) at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2219) at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:143) at android.os.Looper.loop(Looper.java:122) at android.app.ActivityThread.main(ActivityThread.java:5348) 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:947) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)