Android Studio开发调试Installation failed since the device possibly has stale dexed jars
16lz
2021-01-23
写完代码运行时,出现了程序安装失败的对话框:
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
点击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
经过自己的实际测试,发现问题解决了~~
更多相关文章
- 《第一行代码--Android》 Git时间
- android 笔记 --- Android-图片透明度处理代码
- android时间对话框的核心代码
- Android 代码实现按钮 按下弹起事件
- 【原创】Android 对话框的使用
- android post方式传递参数并获取返回数据代码
- Android 再按一次返回键退出 代码
- Android普通对话框用法实例分析
- Android中发短信的代码