问题:
Android Studio 2.3版本中使用小米手机调试代码时,出现下面的问题,导致安装apk失败,笔者是小米4;
应用程序安装失败信息如下:
Installation failed with message Failed to establish session.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
应用程序安装失败提示框如下:
解决如下:
到开发者选项中,拉到最底部找到启用MIUI优化,关闭这个选项即可;