Multidex 应用程序无法在 Android 2.3.6 上运行

Multidex App not working on Android 2.3.6

最近我不得不为我们的应用程序启用 multidex 支持,因为它无法在许多设备 运行 的旧版本 Android 上安装或启动时崩溃。启用后,该应用程序成功安装 with some tweaking,在大多数 Android 版本上,除了 2.3.6,它给出以下消息:

Cannot Download - The content is not supported on this phone

我无法对此进行测试,因为我没有设备 运行 2.3.6,而且 Android Studio 没有为此版本提供模拟器。如果有人告诉我应用程序在 Android 2.3.6 上发生了什么,我将不胜感激 - 即为什么不支持应用程序在其他较低版本(如 2.3.3 和 2.2 等)上运行良好的地方

实际上官方页面中提到了这一点,在Android 4.0 (API level 14)

之前可能会有问题

https://developer.android.com/tools/building/multidex.html#limitations

以下是与平台版本相关的 2 个主要问题

Applications that use multidex may not start on devices that run versions of the platform earlier than Android 4.0 (API level 14) due to a Dalvik linearAlloc bug (Issue 22586). If you are targeting API levels earlier than 14, make sure to perform testing with these versions of the platform as your application can have issues at startup or when particular groups of classes are loaded. Code shrinking can reduce or possibly eliminate these potential issues.

Applications using a multidex configuration that make very large memory allocation requests may crash during run time due to a Dalvik linearAlloc limit (Issue 78035). The allocation limit was increased in Android 4.0 (API level 14), but apps may still run into this limit on Android versions prior to Android 5.0 (API level 21).