Android Studio开发调试Installation failed since the device possibly has stale dexed jars

来源:互联网 发布:唐筛报告怎么看 知乎 编辑:程序博客网 时间:2024/06/06 15:46

写完代码运行时,出现了程序安装失败的对话框:

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 ap

Application Installation Failed

点击OK后,并不能成功删除、卸载apk

Installing APK: E:\Workspace\AndroidStudio\SweepMine\app\build\outputs\apk\app-debug.apk
Uploading file to: /data/local/tmp/com.game.sweep.mine
Installing com.game.sweep.mine
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.game.sweep.mine"
    pkg: /data/local/tmp/com.game.sweep.mine
Failure [INSTALL_FAILED_DEXOPT]

DEVICE SHELL COMMAND: pm uninstall com.game.sweep.mine
DELETE_FAILED_INTERNAL_ERROR


我的解决办法是:

1、AndroidStudio-> Build -> Clean Projects  然后等下面任务完成后,重新运行看看能否解决问题,如果不能再试方法2

2、AndroidStudio-> Setting-> Build, Exception,Deployment -> Instant Run ->不要选中Enable Instant Run to hot swap code


经过自己的实际测试,发现问题解决了~~

1 0
原创粉丝点击