如图

小米手机调试程序报错 Installation failed with message Failed to establish session.

解决办法

一,


根据以下路径,找到Instant Run中的选项 1.<pre>File ——> Settings ——> Build, Execution,Deployment ——> Instant Run2.将Enable Instant Run to hot swap code/resource changes on deploy(default enabled)的选择框取消,点击Apply,保存设置就OK了。
小米手机调试程序报错 Installation failed with message Failed to establish session.
方法二:在手机的开发者选项中关闭MIUI优化
  1. 进入到手机的开发者模式,在最下面有一个启用MIUI优化选项,关闭这个选项会提示重启手机,选择关闭并重启重新启动后,再次运行我们的程序,就可以在手机上运行了。


    小米手机调试程序报错 Installation failed with message Failed to establish session.
    关闭启用MIUI优化.png

相关文章: