1. 程式人生 > >關於小米手機用AndroidStudio利用USB資料線安裝APK問題

關於小米手機用AndroidStudio利用USB資料線安裝APK問題

1、最近利用AndroidStudio在連線USB的小米4手機安裝APK,但是失敗了,一直顯示一個錯誤,
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.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?
如圖:
這裡寫圖片描述
百度了半天,都是些沒用的東東(唉,如今想百度出有質量的東西確實難啊,像淘金一洋),後來在哪個微博上看見了,就解決了這個問題。
先說明下,以前的小米系統可以不會出現這種錯誤,但是新系統就會了

2、解決:在開發者選項-啟動優化MIUI,去掉這個啟動優化MIUI,提示重啟,然後就不會出現錯誤了
這裡寫圖片描述
我的系統是MIUI8的,所以會出現這種狀況
這裡寫圖片描述