[Android] INSTALL_FAILED_DEXOPT

Posted in :

想測試 multiDex true 在 Android 5.0 (API 21) 環境下,能不能正常安裝,結果安裝不上去,會顯示錯誤訊息:

INSTALL_FAILED_DEXOPT

錯誤畫面:

我使用的 image 是有 google api 的,改用沒有 google api 的 image 就沒問題,可以正常的安裝。

附註:在macOS 裡 adb 指令在這個 path:

~/Library/Android/sdk/platform-tools/

在這個目錄下就可以執行 adb 指令去安裝 apk, 例如:

./adb shell pm install -t -r "/data/local/tmp/com.your-co.your-app"

有試過網友提供的方法:

Restarting the emulator from the Android SDK and AVD Manager and selecting the option Wipe User Data.

開發環境 android studio 和 emulator 都重開,也重新下載都無效。

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *