I have a Xamarin project that has been working for some time. We recently (a few months ago) had to enable MultiDex
. For some reason yesterday it started to refuse to work on devices with Android 4.2. This had been working fine and I'm not sure what changed to affect it. We are seeing this message in the Android log:
> 01-10 08:12:09.903 E/AndroidRuntime(20781): FATAL EXCEPTION: main
> 01-10 08:12:09.903 E/AndroidRuntime(20781):
> java.lang.RuntimeException: Unable to instantiate application
> mono.android.app.Application: java.lang.ClassNotFoundException: Didn't
> find class "mono.android.app.Application" on path:
> /data/app/com.afs.dsd_mobile-1.apk
From what I can tell this is due to the application class being listed in the wrong classes.dex
file. This is based on what I read here:
http://www.jon-douglas.com/2016/09/05/xamarin-android-multidex/
However, when I modify the mainClassesDex.bat
as suggested, it does not fix the problem. Am I missing something?