I have a new Xamarin Forms Android app I'm working on, works great when run in Debug but when in Release mode, consistently crashes. I've narrowed down the line that causes the crash to be where I'm defining the Primary Axis on a chart:
Here's the start of the stack trace extracted from logcat. At a complete loss as to how to resolve since it works perfectly when not running in 'Release' mode. Using a licensed Community License version. I've played around with matching the Linker to the same settings as used by Debug, but the same problem. I'm stumped.
01-20 20:58:01.205: E/AndroidRuntime(8853): java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
01-20 20:58:01.205: E/AndroidRuntime(8853): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
01-20 20:58:01.205: E/AndroidRuntime(8853): Caused by: java.lang.reflect.InvocationTargetException
01-20 20:58:01.205: E/AndroidRuntime(8853): at java.lang.reflect.Method.invoke(Native Method)
01-20 20:58:01.205: E/AndroidRuntime(8853): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
01-20 20:58:01.205: E/AndroidRuntime(8853): ... 1 more
01-20 20:58:01.205: E/AndroidRuntime(8853): Caused by: android.runtime.JavaProxyThrowable: System.ArgumentException: Set Method not found for 'NativeObject'
01-20 20:58:01.205: E/AndroidRuntime(8853): at System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00029] in <5a880efca80f49e7b955a9ffbdc82de9>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value) [0x00000] in <5a880efca80f49e7b955a9ffbdc82de9>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Syncfusion.SfChart.XForms.Droid.SfChartRenderer.SetNativeObject (System.Type type, System.Object obj, System.Object nativeObject) [0x0001b] in <c50628162fa446adb41dcf53a3feb2a2>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Syncfusion.SfChart.XForms.Droid.SfChartMapping.OnChartPropertiesChanged (System.String propertyName, Syncfusion.SfChart.XForms.SfChart formsChart, Com.Syncfusion.Charts.SfChart nativeChart) [0x00025] in <c50628162fa446adb41dcf53a3feb2a2>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Syncfusion.SfChart.XForms.Droid.SfChartRenderer.GetNativeChart (Syncfusion.SfChart.XForms.SfChart sfChart) [0x00077] in <c50628162fa446adb41dcf53a3feb2a2>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Syncfusion.SfChart.XForms.Droid.SfChartRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x0003d] in <c50628162fa446adb41dcf53a3feb2a2>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000fc] in <556464d784854d58957ce21f4c5eb182>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00027] in <556464d784854d58957ce21f4c5eb182>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Xamarin.Forms.Platform.Android.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001f] in <556464d784854d58957ce21f4c5eb182>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Xamarin.Forms.Platform.Android.VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) [0x00023] in <556464d784854d58957ce21f4c5eb182>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Xamarin.Forms.Platform.Android.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x0010d] in <556464d784854d58957ce21f4c5eb182>:0
01-20 20:58:01.205: E/AndroidRuntime(8853): at Xamarin.Forms.Platform.Android.VisualElementPackager.Load () [0x0000d] in <556464d784854d58957ce21f4c5eb182>:0