Reputation: 187
I am developing app on android using xamarin forms. Since few days, I am getting below issue.
CurrentDomainOnUnhandledException ---> System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.Platform+DefaultRenderer from native handle 0xbeb0861c (key_handle 0xb3a225b). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.Platform+DefaultRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown. 05-02 14:36:57.973 I/mono-stdout(16628): System.Exception: CurrentDomainOnUnhandledException ---> System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.Platform+DefaultRenderer from native handle 0xbeb0861c (key_handle 0xb3a225b). ---> System.MissingMethodException: No constructor found for Xamarin.Forms.Platform.Android.Platform+DefaultRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown. --- End of inner exception stack trace --- 05-02 14:36:57.975 I/mono-stdout(16628):
--- End of inner exception stack trace --- at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00054] in :0 05-02 14:36:57.978 I/mono-stdout(16628): at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00054] in :0 at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00111] in :0 05-02 14:36:57.980 I/mono-stdout(16628): at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00111] in :0 --- End of inner exception stack trace --- 05-02 14:36:57.982 I/mono-stdout(16628): --- End of inner exception stack trace --- at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017d] in :0 05-02 14:36:57.984 I/mono-stdout(16628): at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017d] in :0 at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000b9] in :0 05-02 14:36:57.986 I/mono-stdout(16628): at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000b9] in :0 at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in :0 05-02 14:36:57.988 I/mono-stdout(16628): at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in :0at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in :0 at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in :0 at Android.Views.View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x00000] in :0 at (wrapper dynamic-method) System.Object:3943ee27-49d5-404c-b2ef-5f107b52e084 (intptr,intptr,intptr) --- End of inner exception stack trace
Upvotes: 1
Views: 1507
Reputation: 187
It can be done by just adding constructor to all custom renderers. public CustomEntryImageRenderer(IntPtr handle, JniHandleOwnership transfer) { }
I changed all my controls to custom renderers and added this constructor for all renderers.
If you are using any rg plugins popup, set animation to false.
4.Add below override method to your custom renderer listview.
protected override void Dispose(bool disposing)
{
Xamarin.Forms.Device.BeginInvokeOnMainThread(base.Dispose);
}
Upvotes: 2