It is possible that this issue is resolved by uninstalling an existing version of the apk if it is

换了个电脑运行Android studio安装apk时,弹出窗口,点确定安装失败。窗口内容如下:
  1. Installation failed with message Failed to establish session.  
  2. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.  
  3.   
  4. WARNING: Uninstalling will remove the application data!  
  5.   
  6. Do you want to uninstall the existing application?  

解决方法:

设置Android Studio 中Instant Run中的选项为不选中

1、根据以下路径,找到Instant Run中的选项 

2、File —— Settings——Build,Execution,Deployment——Instant Run

将Enable Instant Run to hot swap code/resource changes on deploy(default enabled)的选择框取消。

3、点击Apply,保存设置。

4、进入到手机的开发者模式,在最下面有一个启用MIUI优化选项,关闭这个选项会提示重启手机,选择关闭并重启重新启动后,再次运行,就可以在手机上运行了。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值