0

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.

user292565
  • 31
  • 1
  • 6
  • 1
    it might be because of the signing, take a look: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_2_-_signing_the_android_application_package/ – Alex Dec 13 '17 at 15:37
  • Have you checked the `Enabled Proguard`? – Robbit Dec 14 '17 at 06:29
  • What is the linking in your project? Your project->Properties->Android Options, show your linking.[Take a look](https://developer.xamarin.com/guides/android/advanced_topics/linking/), maybe you should remove some assemblies or change your linking. – Robbit Dec 14 '17 at 09:24
  • I do not have Proguard Enabled but thats not compulsory right? – user292565 Dec 15 '17 at 09:47

0 Answers0