Do I know if I need Multi-Dex enabled? (ClassNotFoundException)

后端 未结 2 1983
臣服心动
臣服心动 2020-11-27 08:09

Suddenly and seemingly for no reason at all, the following error starts presenting itself. After fighting it all day, I discovered enabling Multi-Dex resolved it. Is this er

相关标签:
2条回答
  • 2020-11-27 08:41

    First, you can count the method references (and see other useful insight) using the APK Analyzer tool. It is shipped with Android Studio; you can find it under the Build menu and it's also available from the command line with apkanalyzer.

    Second, you will get a build error indicating you need to use multi dex. It looks like:

    trouble writing output: Too many field references: 131000; max is 65536. You may try using --multi-dex option.

    More here: https://developer.android.com/studio/build/multidex.html

    0 讨论(0)
  • 2020-11-27 08:53

    java.lang.ClassNotFoundException: Didn't find class

    This is a known issue in the creation of the Java classes.zip file in the following release:

    December 4th, 2017 - Xamarin.Android 8.1.0.24

    • This version is included in the Visual Studio 2017 version 15.5 release.

    Java.lang.ClassNotFoundException

    We have had multiple reports regarding applications running into a "Java.Lang.ClassNotFoundException: Didn't find class on path: DexPathList" exception.

    Bug: xamarin.android_8.1/#Known_Issues

    GitHub PR fix: https://github.com/xamarin/xamarin-android/pull/1142

    Workaround:

    You can clean/rebuild as a workaround on Windows in order to recreate the Java classes.zip file

    0 讨论(0)
提交回复
热议问题