Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failure [INSTALL_FAILED_DEXOPT] with Android Studio 0.8.1

When I try to debug my app I am getting this error: Failure [INSTALL_FAILED_DEXOPT]

I am using Android Studio 0.8.1. This is the log when I am trying to install and debug the app.

Installing <mypackage>
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/<mypackage>"
pkg: /data/local/tmp/<mypackage>
Failure [INSTALL_FAILED_DEXOPT]

Now it happens with all apps in my IDE, with all my real and virtual devices.

Logcat:

07-09 01:34:53.895      585-609/? I/PackageManager﹕ Running dexopt on: mypackage
07-09 01:34:53.915  17728-17728/? W/dalvikvm﹕ DexOptZ: zip archive '/data/app/mypackage-1.apk' does not include classes.dex
07-09 01:34:53.915      177-177/? W/installd﹕ DexInv: --- END '/data/app/mypackage-1.apk' --- status=0xff00, process failed
07-09 01:34:53.915      177-177/? E/installd﹕ dexopt in='/data/app/mypackage.apk' out='/data/dalvik-cache/data@[email protected]@classes.dex' res=65280
07-09 01:34:53.915      585-609/? W/PackageManager﹕ Couldn't delete native library directory /data/app-lib/mypackage
like image 532
Gabriele Mariotti Avatar asked Oct 31 '22 20:10

Gabriele Mariotti


2 Answers

In my case this error appeared when i enabled again Instant Run. By disabling it dissapeared.

like image 61
Carlos Hernández Gil Avatar answered Nov 11 '22 04:11

Carlos Hernández Gil


Solved invalidating the cache and deleting the .AndroidStudioBeta folder

To invalidate the cache use in Android Studio: File -> Invalidate Caches and restart

like image 41
Gabriele Mariotti Avatar answered Nov 11 '22 02:11

Gabriele Mariotti