问题
Even though there are several posts about dexopt errors none of them helped. I suddenly started to receive dexopt errors : Failure [INSTALL_FAILED_DEXOPT]. Ive tried uninstalling the app from my phone but it didnt help. Ive tried to wipe app data from /data/data/ and it didnt help either. However, if i run for second time after install failed dexopt error, i receive an Failure [INSTALL_FAILED_UID_CHANGED] error. After wiping /data/data again comes the same error sequence explained above.
Ive also tried to wipe temp folder as well with no difference in results. Ive also tried to wipe all other apps that ive installed through android studio and it still gives me same error. Any ideas? I am installing in on rooted LG G2 if it makes any difference at all.
回答1:
if you use android studio 2.0, DISABLE the instant run.
FYI, instant run is new feature from android studio 2.0 (i never used it >.<)
how to disable : preferences -> build, execution & deployment -> instant run -> disable, then works like magic
Enjoy!
回答2:
Found solution to this problem. I installed Titanium Backup app, went to batch actions and removed the orphan data of the app. After this everything went on smoothly! It seems that deleting old data from /data/data was not enough.
来源:https://stackoverflow.com/questions/24506174/solving-install-error-dexopt