Xamarin Forms Android Store crashes when i download the app, debugs perfectly on phone from VS

327 Views Asked by At

This is my first commit on google play store. I am using Xamarin Forms and when i run my app localy on my android phone, i have no issues.

When I Archive and Distribute the App within VS using Archive Manager and download it on my phone, or any other android phone, the App crashes before going to the 1st screen.

Under Play Console I can see the following error on the Pre-Lunch report

Blockquote FATAL EXCEPTION: main Process: com.*****.*****, PID: 8647 android.runtime.JavaProxyThrowable: Xamarin.Forms.Xaml.XamlParseException: Position 30:125. No method OnMenuItemSelected2 found on type *****.Menus.MainPageV2 at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.SetPropertyValue (System.Object xamlelement, Xamarin.Forms.Xaml.XmlName propertyName, System.Object value, System.Object rootElement, Xamarin.Forms.Xaml.INode node, Xamarin.Forms.Xaml.HydrationContext context, System.Xml.IXmlLineInfo lineInfo) [0x000ee] in :0 at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.Visit (Xamarin.Forms.Xaml.ValueNode node, Xamarin.Forms.Xaml.INode parentNode) [0x00072] in :0 at Xamarin.Forms.Xaml.ValueNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00000] in :0 at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00043] in :0 at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00078] in :0 at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00078] in :0 at Xamarin.Forms.Xaml.RootNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00043] in :0 at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydrationContext visitorContext) [0x00083] in :0 at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml) [0x0008f] in :0 at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.Type callingType) [0x0002f] in :0 at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (TXaml view, System.Type callingType) [0x00000] in :0 at ****.Menus.MainPageV2.InitializeComponent () [0x00000] in :0 at ****.Menus.MainPageV2..ctor () [0x00006] in :0 at ****.App..ctor () [0x0000c] in :0 at ****.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00022] in :0 at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in :0 at (wrapper dynamic-method) System.Object:efb18139-d766-47ea-a9bd-57beaf3952f0 (intptr,intptr,intptr) at md5684c7b5241d0a7c4d4ea0533a804cbec.MainActivity.n_onCreate(Native Method) at md5684c7b5241d0a7c4d4ea0533a804cbec.MainActivity.onCreate(MainActivity.java:29) at android.app.Activity.performCreate(Activity.java:6975) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

The thing is that my Menus.MainPageV2 includes OnMenuItemSelected2 which is run just fine when testing localy

The automated Google Test results on the on the Pre-Lunch report are failing for all testing devices with the same error.

Things I tried changing, re-Archiving and Distributing: - Closed VS, cleaned bin, obj directories and Re-Built - Upgraded to the latest Xamarin Forms Nuget - Linking with None, Sdk and User Assemblies, Sdk Assemblies only

Anyone have any ideas on what else i might try to get this to work ?

Thank you for your time.

0

There are 0 best solutions below