Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
System.NotSupportedExceptionUnable to activate instance of type Android.Views.IMenuItemInvoker from native handle 0xfe50001d (key_handle 0x6cc3aa9).
at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x001a4] in <filename unknown>:0
at Java.Lang.Object.GetObject (IntPtr handle, JniHandleOwnership transfer, System.Type type) [0x000e5] in <filename unknown>:0
at Java.Lang.Object._GetObject[T] (IntPtr handle, JniHandleOwnership transfer) [0x0001a] in <filename unknown>:0
at Java.Lang.Object.GetObject[T] (IntPtr handle, JniHandleOwnership transfer) [0x00000] in <filename unknown>:0
at Android.Views.IMenuInvoker.FindItem (Int32 id) [0x00059] in <filename unknown>:0
at CashRush.Droid.MainActivity.OnCreateOptionsMenu (IMenu menu) [0x00025] in <filename unknown>:0
at Android.App.Activity.n_OnCreateOptionsMenu_Landroid_view_Menu_ (IntPtr jnienv, IntPtr native__this, IntPtr native_menu) [0x00011] in <filename unknown>:0
at (wrapper dynamic-method) System.Object:b586121b-16ef-4f99-a71e-99776a5127c6 (intptr,intptr,intptr)
System.MissingMethodExceptionNo constructor found for Android.Views.IMenuItemInvoker::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)
at Java.Interop.TypeManager.CreateProxy (System.Type type, IntPtr handle, JniHandleOwnership transfer) [0x00058] in <filename unknown>:0
at Java.Interop.TypeManager.CreateInstance (IntPtr handle, JniHandleOwnership transfer, System.Type targetType) [0x0012c] in <filename unknown>:0
Java.Lang.ErrorException of type 'Java.Interop.JavaLocationException' was thrown.
Looks there is missing JNI constructor inside "IMenuItemInvoker". This constructor should be provided as MenuItem is touched by Android activity lifecycle.
I suspect IMenuItemInvoker is internal JNI binding helper class located inside something like "MenuItem".
Is this a Debug or Release app?
The IMenuItemInvoker(IntPtr, JniHandleOwnership) constructor *should* be present. Perhaps it's a linker bug in Release builds?
It's release build with SDK assemblies linking.
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Android. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.