Failure to install APK [INSTALL_FAILED_DEXOPT] Android Studio

假如想象 提交于 2019-12-01 04:03:58

So turns out that the issue was mismatching sdks between Android Studio and the Project. The project was using an old sdk and once I made them the same, I cleaned and rebuilt the project and everything was good to go.

UPDATE:

I ran into the problem again after I tried to update my SDK and its tools. Turns out that when you try to do this, the SDK locks the tools folder and then you get an error saying some file couldn't be overridden. When this happened to me, all the build tools were deleted so there were errors in the .dex file created when debuggin my app.

We are using android 2.2 (really old i know) and couldn't find a fix for this error. Eventually we found this bug https://android-review.googlesource.com/#/c/30900/. The only solution for us was to remove some libraries...

I kept having the same problem - manually building worked fine, but Android Studio would not build a proper APK.

The problem was that I started the project on Android Studio and Android Gradle plugin version 2.0-beta2. After updating the Gradle plugin to 2.0-beta6 through a simple build.gradle change, the builds stopped working.

Turns out that, although I installed a beta version of Android Studio, the update checker only checked the stable channel. After setting the updater to check the canary channel as well, I was able to upgrade Android Studio to version 2.0-beta6 and builds continued to work normally.

You can change the update preference in Android Studio settings under Appearance and Behavior -> System Settings -> Updates.

I encountered this error when storage of the device is full. Try to open some space.

Try run these commands adb reconnect adb reconnect device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!