How do I solve the INSTALL_FAILED_DEXOPT error?
Solution 1:
Restarting the emulator from the Android SDK and AVD Manager
and selecting the option Wipe User Data
has solved this problem for me.
You can find the option as highlighted in the below given image:
Solution 2:
This seemed to be related to disk space for me. A newly rolled 5.1 emulator boots with a "low on disk space" error - and looking at the emulator properties, the default space allocated for internal storage is 800MB which seems low.
Solution, therefore was to increase this (I went to 4GB). Oddly the emulator still boots with the same disk space warning but factory resetting it (Settings --> Backup and Restore inside the emulator) solved it entirely for me.
Just a bit odd that it doesn't work out of the box with default settings.
Solution 3:
Your old version of the app that you are installing has dependent libraries / jars that have been changed. I ran into this issue when updating other jar files that my app was refrencing.
You will need to Uninstall your old version and then you should have no more issues...
Settings-->Applications-->Manage Applications-->[Find and Uninstall your App]
INSTALL_FAILED_DEXOPT errors should not erupt. Like
[2011-06-14 01:23:40 - ProtectYourself] Installing ProtectYourself.apk...
[2011-06-14 01:24:26 - ProtectYourself] Installation error: INSTALL_FAILED_DEXOPT
[2011-06-14 01:24:26 - ProtectYourself] Please check logcat output for more details.
[2011-06-14 01:24:26 - ProtectYourself] Launch canceled!
Whoo hoo.
Solution 4:
Ran into this with Android Studio 3.4.1 but using an older (5.0) emulator. This procedure (on Mac) fixed the issue:
- stop emulator
- cd ~/.android/avd/[emulator name].avd
- rm *.lock
- wipe emulator
- start emulator