galadril/Xam.Shell.Badge

Crash Xiomi in release mode.

Closed this issue · 3 comments

Hi, in my Xamarin android app I use Xamarin.Shell.Badge in Tab control; it work fine when I test app on my Xiomi physical device (debug mode); when I test my app in release mode or thought Google Play Store beta test, the app crash. The error is:

LOG: MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Android.Runtime.JavaProxyThrowable: Exception of type 'Android.Runtime.JavaProxyThrowable' was thrown.
[MonoDroid] --- End of managed Android.Runtime.JavaProxyThrowable stack trace ---
[MonoDroid] android.runtime.JavaProxyThrowable: System.MissingMethodException: Default constructor not found for type Xam.Shell.Badge.Droid.Renderers.BadgeShellRenderer

Thank you.

Hello, @nellogaudino, when you set your Linker behaviour to None, do you have the same problem appearing? Can you re-create the release and try with this setting? And please, provide the current value of "Linker behaviour" property of your Android project.

Hello, when I set linker behavior to "None" or to "Link SDK assemblies only" all work fine. My previous setting was "Link all assemblies"
Thank you!

Yes, please, use "Link SDK assemblies only" or configure your Linker settings file deeply. It is really rare to use "Link all assemblies" option, cause it may lead to unpredictable errors and you don't save much more APK size in comparison with "Link SDK assemblies only" (recommended option).