Android系统移植与调试之------->安装apk时出现错误Failure [INSTALL_FAILED_DEXOPT]问题解决的方法
2013-09-09 18:09
951 查看
在android4.0源码里面编译出来apk后,用adb install (或adb install -r 重装)安装时,报错[INSTALL_FAILED_DEXOPT]。
xu@xu-PC:~$ adb install workspace/out/target/product/generic/system/app/xxx.apk
2820 KB/s (225970 bytes in 0.078s)
pkg: /data/local/tmp/xxx.apk
Failure [INSTALL_FAILED_DEXOPT]
或者
xu@xu-PC:~$ adb install -r workspace/out/target/product/generic/system/app/xxx.apk
2768 KB/s (225970 bytes in 0.079s)
pkg: /data/local/tmp/xxx.apk
Failure [INSTALL_FAILED_DEXOPT]
这是因为在system\app下面的apk是经过优化的,而dex文件不会打包到apk中,dex文件会被优化后,生成odex文件。
下面就是程序经编译之后,在workspace/out/target/product/generic/system/app/下生成的.odex和.apk两个文件
Install: out/target/product/generic/system/app/xxx.odex
Install: out/target/product/generic/system/app/xxx.apk
这样安装apk时,就会缺少dex文件,导致报错[INSTALL_FAILED_DEXOPT]。
-->解决办法:
找到未优化过的apk,即在out/target/product/generic/obj/APPS/下找到对应的工程:
xu@xu-PC:~$ adb install workspace/out/target/product/generic/obj/APPS/xxx_intermediates/package.apk.unaligned
2400 KB/s (331697 bytes in 0.134s)
pkg: /data/local/tmp/package.apk.unaligned
Success
xu@xu-PC:~$
如果已经安装了该程序,可以重装一下:
xu@xu-PC:~$ adb install -r workspace/out/target/product/generic/obj/APPS/xxx_intermediates/package.apk.unaligned
2873 KB/s (331689 bytes in 0.112s)
pkg: /data/local/tmp/package.apk.unaligned
Success
这样就安装ok了!
(本文转载于:http://blog.csdn.net/xiaoyaovsxin/article/details/8216452)
xu@xu-PC:~$ adb install workspace/out/target/product/generic/system/app/xxx.apk
2820 KB/s (225970 bytes in 0.078s)
pkg: /data/local/tmp/xxx.apk
Failure [INSTALL_FAILED_DEXOPT]
或者
xu@xu-PC:~$ adb install -r workspace/out/target/product/generic/system/app/xxx.apk
2768 KB/s (225970 bytes in 0.079s)
pkg: /data/local/tmp/xxx.apk
Failure [INSTALL_FAILED_DEXOPT]
这是因为在system\app下面的apk是经过优化的,而dex文件不会打包到apk中,dex文件会被优化后,生成odex文件。
下面就是程序经编译之后,在workspace/out/target/product/generic/system/app/下生成的.odex和.apk两个文件
Install: out/target/product/generic/system/app/xxx.odex
Install: out/target/product/generic/system/app/xxx.apk
这样安装apk时,就会缺少dex文件,导致报错[INSTALL_FAILED_DEXOPT]。
-->解决办法:
找到未优化过的apk,即在out/target/product/generic/obj/APPS/下找到对应的工程:
xu@xu-PC:~$ adb install workspace/out/target/product/generic/obj/APPS/xxx_intermediates/package.apk.unaligned
2400 KB/s (331697 bytes in 0.134s)
pkg: /data/local/tmp/package.apk.unaligned
Success
xu@xu-PC:~$
如果已经安装了该程序,可以重装一下:
xu@xu-PC:~$ adb install -r workspace/out/target/product/generic/obj/APPS/xxx_intermediates/package.apk.unaligned
2873 KB/s (331689 bytes in 0.112s)
pkg: /data/local/tmp/package.apk.unaligned
Success
这样就安装ok了!
(本文转载于:http://blog.csdn.net/xiaoyaovsxin/article/details/8216452)
相关文章推荐
- Android系统移植与调试之安装apk时MTK命令和出现Failure [INSTALL_FAILED_DEXOPT]问题解决方法
- Android系统移植与调试之安装apk时MTK命令和出现Failure [INSTALL_FAILED_DEXOPT]问题解决方法
- 安装apk时出现错误Failure [INSTALL_FAILED_DEXOPT]问题解决的方法
- 安装apk时出现错误Failure [INSTALL_FAILED_DEXOPT]问题解决的方法
- 安装apk时出现错误Failure [INSTALL_FAILED_DEXOPT]问题解决的方法
- 安装apk时出现错误Failure [INSTALL_FAILED_DEXOPT]问题解决的方法
- 安装apk时出现错误Failure [INSTALL_FAILED_DEXOPT]问题解决的方法
- android apk包在android 2.3以下系统上安装时遇到的INSTALL_FAILED_DEXOPT和LinearAlloc exceeded capacity问题解决方法
- Android之机端安装apk出现INSTALL_FAILED_INSUFFICIENT_STORAGE错误的解决方法
- 安装apk时出现错误Failure [INSTALL_FAILED_DEXOPT]
- androidstudio签名打包之后apk安装不上,adb报错Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]的原因及解决方法
- gemotion安装apk出现的INSTALL_FAILED_NO_MATCHING_ABIS错误解决方法
- 关于Android应用调试在小米手机安装程序时出现Installation failed with message INSTALL_CANCELED_BY_USER问题解决
- 新版Android源码用mmm编译 apk 优化,导致Failure [INSTALL_FAILED_DEXOPT]问题的解决办法
- android 中向手机端安装apk 的时候报出 INSTALL_FAILED_INSUFFICIENT_STORAGE 错误的解决方法
- Android当代码方法超过65536个时,在2.3机器上会不能安装,出现INSTALL_FAILED_DEXOPT错误
- Android安装软件时出现的错误提示:INSTALL_FAILED_CONTAINER_ERROR的解决方法
- android 中向手机端安装apk 的时候报出 INSTALL_FAILED_INSUFFICIENT_STORAGE 错误的解决方法
- 使用Genymotion安装APK出现错误Failure [INSTALL_FAILED_NO_MATCHING_ABIS]解决办法
- android 真机调试出现错误 INSTALL_FAILED_INSUFFICIENT_STORAGE 的解决方法。