Android Installation failed with message...It is possible that this issue is resolved by uninstalli


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?

Android Installation failed with message...It is possible that this issue is resolved by uninstalli_第1张图片

其实运行过程中遇到的错误(无法正常运行到手机或模拟器上),一般就是手机权限设置问题和开发工具设置的问题了,下面来看看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,重新运行程序,大功告成

Android Installation failed with message...It is possible that this issue is resolved by uninstalli_第2张图片

如果你没有成功,接下来使用第二招:
1、打开Edit Configurations...
2、在Install Flags中写上“-t”

3、依次点击Apply——OK,重新运行就可以了

Android Installation failed with message...It is possible that this issue is resolved by uninstalli_第3张图片

一般情况下上面的两步就可以搞定的

你可能感兴趣的:(Android之Studio)