解決小米手機Android Studio安裝app 報錯的問題It is possible that this issue is resolved by uninstalling an existi


問題描述

Android  Studio升級到2.3版本之后,小米手機MIUI8不能運行Android Studio程序,報如下錯誤:

[html] view plain copy
  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中的選項 
    File —— Settings——Build,Execution,Deployment——Instant Run
  2. 將Enable Instant Run to hot swap code/resource changes on deploy(default enabled)的選擇框取消。





3.點擊Apply,保存設置就OK了。

在手機的開發者模式中關閉MIUI優化

進入到手機的開發者模式,在最下面有一個啟用MIUI優化選項,關閉這個選項會提示重啟手機,選擇關閉並重啟重新啟動后,再次運行我們的程序,就可以在手機上運行了。




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM