I am using Android Studio to develop this app, and today when I tried to upload it to my device to test I got a popup window saying:
Installation failed since the device possibly has stale dexed jars that don't match the current version (dexopt error). In order to proceed, you have to uninstall the existing application.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
It gave two options, OK or Cancel. Upon hitting OK, the following message showed up in the Run tab:
DEVICE SHELL COMMAND: pm uninstall my.bundle.id
Unknown failure
The app seems to be uninstalled, the is no trace of it under Manage Applications.
I am unable to upload the app. I tried cleaning the project and rebuilding, but it didn't work.
What can I do?
I have also encountered this problem in Android Studio, from version 2.0 Preview 6 all the way up to 2.0 Beta 3 and none of the solutions mentioned here worked for me.
Turned up it had nothing to do with Instant Run. All I had to do was to increase the AVD's Internal Storage until the following notification disappeared. I also had to perform a data wipe after changing the values.
I disabled Instant run for this project, and problem solved.
Maybe it's a bug in the instant run feature of Android studio 2.0 preview.
Instant Run is a new feature introduced in Android Studio 2.0.
ps: in case you don't find Instant run, its in:
Android Studio --> Preferences --> Build, execution, deploy --> Instant run.
or you can search for it in the preferences tab.
Go to AVD Manager, then in the action section of your device select wipe data. This worked for me, hope it helps....
This helped me for the emulator: Close Emulator. Tools > AVD Manager > Select Emulator Settings > Wipe Data > Cold Boot.. Now Install App.
Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With