1.今天一个朋友问我这样一个错误,信息和图如下:
Installation failed with message...It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?

其实运行过程中遇到的错误(无法正常运行到手机或模拟器上),一般就是手机权限设置问题和开发工具设置的问题了,下面来看看Studio中的设置,手机上的USB权限就不说了,你懂的:
2.解决方法:
1、打开菜单File——Settings——Build,Execution,Deployment——Instant Run
2、不选中Enable Instant Run to hot swap code/resource changes on deploy(default enabled)
3、依次点击Apply——OK,重新运行程序,大功告成

如果你没有成功,接下来使用第二招:
1、打开Edit Configurations...
2、在Install Flags中写上“-t”
3、依次点击Apply——OK,重新运行就可以了

一般情况下上面的两步就可以搞定的
本文介绍了当Android应用出现安装失败的情况时的两种解决方案。首先,可以在Android Studio中禁用Instant Run功能;如果问题仍未解决,则可以在配置文件中添加特定标志以确保应用正确安装。
4942

被折叠的 条评论
为什么被折叠?



