The Problem: The apk does not include classes.dex
Recently, when I deploy my simple Android application to emulator in Android Studio, it always fails with error: Failure [INSTALL_FAILED_DEXOPT]
Check the logcat log: it shows: "The apk does not include classes.dex".
05-13 16:10:23.740 394-417/system_process W/ActivityManager﹕ No content provider found for permission revoke:
05-13 16:10:29.150 1055-1055/? W/dalvikvm﹕ DexOptZ: zip archive '/data/app/org.lifelongprogrammer.tools.myapp-1.apk' does not include classes.dex
05-13 16:10:29.160 53-53/? W/installd﹕ DexInv: --- END '/data/app/org.lifelongprogrammer.tools.myapp-1.apk' --- status=0xff00, process failed
I checked the built apk file at\app\build\apk, there is indeed no classes.dex in the apk file.
Google searched, but didn't didn't solution.
The Workaround: Build the app manually in command line
So I tried to use gradlew.bat to build the app manully: "gradlew.bat clean assembleDebug" then check the built apk file at\app\build\ap, it is larger, and indeed include classes.dex.
In Android studio, deploy the app to the emulator, it works. Also deploy it to my Android phone, it also works.
I think the problem should be in Android studio. But anyway I can continue to develop my application :)
Recently, when I deploy my simple Android application to emulator in Android Studio, it always fails with error: Failure [INSTALL_FAILED_DEXOPT]
Check the logcat log: it shows: "The apk does not include classes.dex".
05-13 16:10:23.740 394-417/system_process W/ActivityManager﹕ No content provider found for permission revoke:
05-13 16:10:29.150 1055-1055/? W/dalvikvm﹕ DexOptZ: zip archive '/data/app/org.lifelongprogrammer.tools.myapp-1.apk' does not include classes.dex
05-13 16:10:29.160 53-53/? W/installd﹕ DexInv: --- END '/data/app/org.lifelongprogrammer.tools.myapp-1.apk' --- status=0xff00, process failed
I checked the built apk file at
Google searched, but didn't didn't solution.
The Workaround: Build the app manually in command line
So I tried to use gradlew.bat to build the app manully: "gradlew.bat clean assembleDebug" then check the built apk file at
In Android studio, deploy the app to the emulator, it works. Also deploy it to my Android phone, it also works.
I think the problem should be in Android studio. But anyway I can continue to develop my application :)