android - Multidex 应用程序不适用于 Android 2.3.6

标签 android android-multidex

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

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).

关于android - Multidex 应用程序不适用于 Android 2.3.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32522335/

相关文章:

android - 将 Places Autocomplete API 限制为特定国家/地区 android 的城市

android - 当 android rom 是 Root 时,UI Automator 的转储 View 层次结构不获取资源 ID

android - Multidex 找不到类

android - gradle 项目依赖与 MultiDex

Android 4.2.2 设备上的 java.lang.NoClassDefFoundError

android - 在自定义 ListView 中保存编辑框值

android - 数据库升级过程中如何保留和升级SQLITE数据库

android - 错误:任务 ':packageAllDebugClassesForMultiDex'的执行失败。不考虑库

java - 构建失败 : Program type already present: com. facebook.ads.Ad

Android:WebView 旋转阻止键盘打开