Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Exception in the Mainactivity method, when the LoadApplication is finalizing "no non-static method"

$
0
0

Hi,

I'm new to Xamarin, but using Xamarin forms with Prism have got me going with an app with a few pages. The app has been working but after a played around with the packing of the apk file for the app and different platforms version (Android 5 and 8+9) I have been receiving the following exception "no non-static method "Landroid/support/v4/app/FragmentTransaction;.add(ILandroid/support/v4/app/Fragment;)Landroid/support/v4/app/FragmentTransaction;" and I have been unable to find a solution to the issue. I have added the stacktrace below.

Main activity Exception: no non-static method "Landroid/support/v4/app/FragmentTransaction;.add(ILandroid/support/v4/app/Fragment;)Landroid/support/v4/app/FragmentTransaction;" stack: at Java.Interop.JniEnvironment+InstanceMethods.GetMethodID (Java.Interop.JniObjectReference type, System.String name, System.String signature) [0x0005b] in <9ed4c1a7b8844cdcb5330cc881c1cd6a>:0
06-27 11:45:38.978 17142 17142 E Error : at Java.Interop.JniType.GetInstanceMethod (System.String name, System.String signature) [0x0000c] in <9ed4c1a7b8844cdcb5330cc881c1cd6a>:0
06-27 11:45:38.978 17142 17142 E Error : at Java.Interop.JniPeerMembers+JniInstanceMethods.GetMethodInfo (System.String encodedMember) [0x00031] in <9ed4c1a7b8844cdcb5330cc881c1cd6a>:0
06-27 11:45:38.978 17142 17142 E Error : at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeAbstractObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00006] in <9ed4c1a7b8844cdcb5330cc881c1cd6a>:0
06-27 11:45:38.978 17142 17142 E Error : at Android.Support.V4.App.FragmentTransactionInvoker.Add (System.Int32 containerViewId, Android.Support.V4.App.Fragment fragment) [0x00044] in <21e4bb539f4a49b58a498749b367d2a8>:0
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.FragmentManagerExtensions.AddEx (Android.Support.V4.App.FragmentTransaction fragmentTransaction, System.Int32 containerViewId, Android.Support.V4.App.Fragment fragment) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\Extensions\FragmentManagerExtensions.cs:17
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer.AddChildView (Xamarin.Forms.VisualElement childView) [0x000b9] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailContainer.cs:114
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.MasterDetailContainer.set_ChildView (Xamarin.Forms.VisualElement value) [0x0002e] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:47
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.g__Update|79_0 () [0x00022] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:407
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.UpdateDetail () [0x0000d] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:396
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00135] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:158
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) [0x0001f] in D:\a\1\s\Xamarin.Forms.Platform.Android\Platform.cs:343
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.AppCompat.Platform.AddChild (Xamarin.Forms.Page page, System.Boolean layout) [0x0000d] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:352
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPageInternal (Xamarin.Forms.Page newRoot) [0x000ac] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:322
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x00087] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:277
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage (Xamarin.Forms.Page page) [0x00039] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:344
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.SetMainPage () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:370
06-27 11:45:38.978 17142 17142 E Error : at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.LoadApplication (Xamarin.Forms.Application application) [0x000be] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:152
06-27 11:45:38.978 17142 17142 E Error : at ConnectivityApp.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x0007c] in D:\Source\Uneeg\h02\products\HypoSafe\ConnectivityApp\ConnectivityApp\ConnectivityApp.Android\MainActivity.cs:45
06-27 11:45:38.978 17142 17142 E Error : --- End of managed Java.Lang.NoSuchMethodError stack trace ---
06-27 11:45:38.978 17142 17142 E Error : java.la

I hope that one of you Xamarin pros will be able to point me in the direction of a solution to the issue.
Many thanks in advance.

br
Brijak0


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>