android - 安装错误 : INSTALL_FAILED_DEXOPT

标签 android linux-kernel google-play-services android-install-apk dx

您好,我有一个很大的问题,我的应用程序大小约为 10mb,我有 7mb 的 junit (jar) 文件。最近我在添加我的 apk 未安装到 api 级别低于以下的设备后,用我的应用程序更新了 googleplayservice 11. 我在这里添加了我的日志猫。

08-01 15:09:25.333: E/dalvikvm(429): LinearAlloc exceeded capacity (5242880), last=100
08-01 15:09:25.333: E/dalvikvm(429): VM aborting
08-01 15:09:25.522: W/installd(34): DexInv: --- END '/data/app/com.xxxxxx.xxxx.android-1.apk' --- status=0x000b, process failed
08-01 15:09:25.522: E/installd(34): dexopt failed on '/data/dalvik-cache/data@app@com.xxxxx.xxxx.android-1.apk@classes.dex' res = 11

最佳答案

The issues is our method reaches 64k size.
Easy solution for this issues is we need to reduce our function or we need to remove few library which is not necessary.
Best solution is we can use  ant build to take apk. and create build.xml file to  split our library in to two files and we can inject that library in runtime.
We solved that issues buy using ant build.

在 android studio 中还有一个选项可用,他们引入了一个称为多 dex 文件的功能,因此我们可以使用它来解决这个问题。

2015 年 6 月 4 日编辑

当您更新 google play 服务时,问题会出现,因此 android studio 不会添加整个播放服务,而是提供一种将特定 api 添加到项目的方法 Reference它会减少你的方法

关于android - 安装错误 : INSTALL_FAILED_DEXOPT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25077466/

相关文章:

linux - 如何通过 Bus、Device、Function 和 Offset 获取物理地址

linux - 用于新文件系统的 mkfs

powershell - 使用 Firebase Admin SDK 私钥的 Powershell 中的 Google Identity Platform : Using OAuth 2. 0

java - 请参阅调试期间真实设备中的共享首选项 xml 文件

android - 哪个是在 Android 中处理 SOAP 响应的最佳方式

android - Activity has leaked window that is originally added here & other issues, 关注

compilation - 如何并行化可以在多台机器上分配任务的 "make"命令

Circle.ci 上带有 Google Play 服务的 Android AVD

android - 如何在 Google Play 应用中推广应用

android - 如何在android中使用日期和时间选择器,我有什么错误以及如何解决