Crash when tapping on Android's EditText - Xamarin MvvmCross

thangvuthangvu VNMember ✭✭
edited June 2017 in Xamarin.Android

I have an issue related to ActionMenuView and MenuView. So obviously when we double tap or long click on an existing text in Android's EditText, it will show a menu on top of the app, that contains some options like CUT, COPY, etc...

In our project, we used Xamarin (4.5.0.443) MvvmCross 4.4.0, with Multidex enabled. In the debug mode, the MenuView is shown normally. But when we run it in the release mode, when we double tap/ long click on an existing text in EditText, it resulted in a crash. Here's the log:

            java.lang.ClassCastException: android.support.v7.widget.ActionMenuView cannot be cast to com.android.internal.view.menu.MenuView
            com.android.internal.view.menu.BaseMenuPresenter.getMenuView()BaseMenuPresenter.java:70
            android.widget.ActionMenuPresenter.getMenuView()ActionMenuPresenter.java:255
            com.android.internal.widget.ActionBarContextView.initForMode()ActionBarContextView.java:332
            com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode()PhoneWindow.java:3240
            com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild()PhoneWindow.java:3147
            android.view.ViewGroup.startActionModeForChild()ViewGroup.java:716
            android.view.View.startActionMode()View.java:5347
            android.widget.Editor.startSelectionActionMode()Editor.java:1806
            android.widget.Editor.performLongClick()Editor.java:1081
            android.widget.TextView.performLongClick()TextView.java:10646
            android.view.View$CheckForLongPress.run()View.java:21230
            android.os.Handler.handleCallback()Handler.java:739
            android.os.Handler.dispatchMessage()Handler.java:95
            android.os.Looper.loop()Looper.java:145
            android.app.ActivityThread.main()ActivityThread.java:7007
            java.lang.reflect.Method.invoke(Native Method)
            java.lang.reflect.Method.invoke()Method.java:372
            com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:1404
            com.android.internal.os.ZygoteInit.main()ZygoteInit.java:1199

Any help will be sincerely appreciated.

Answers

  • darrell.tunnelldarrell.tunnell USMember ✭✭

    I am seeing the same thing, using mvvmcross 5. Did you ever find a solution for this issue?

Sign In or Register to comment.