2015年11月27日 星期五

Android: Install apk with INSTALL_FAILED_DEXOPT error

I want to install the Camera2 apk which is compiled by myself from AOSP.
However, I come across the error message: INSTALL_FAILED_DEXOPT

Because the my target device has Camera2.apk from GMS.
Without uninstall the Camera2.apk from device,
just push the Camera2.apk you compiled to the device.
1. adb push Camera2.apk system/app/Camera2
2. adb push Camera2.odex.gz system/app/Camera2/x86_64

===========================================
想要build aosp的Camera2
build完後想安裝到device上卻出現
INSTALL_FAILED_DEXOPT  error

主要是devices上已經有Camera2的apk了,

(gms上的Camera叫GoogleCamera)


解決方式:
不砍system/app底下的Camera2 folder,
直接push即可。

1. adb push Camera2.apk system/app/Camera2
2. adb push Camera2.odex.gz system/app/Camera2/x86_64

沒有留言:

張貼留言