解決小米手機Installation failed with message Failed to establish session.

小米手機性價比高,有些問題也很尖銳:

比如我的5S用了黑科技(試驗品)-超聲波指紋解鎖,識別率就很低,每次解鎖都要哈口氣。真後悔

而且最近又遇到新問題,我的小米5S無法通過android studio調試應用,賣批啊(但即使這樣也比藍綠工程的OV手機強百倍)


不扯了,直接解決:


有人提出關閉MIUI優化,參考http://blog.csdn.net/u013132758/article/details/53835992

樓主試過,關閉是可行的,但是遇到一個更加無法忍受的問題,關閉小米手機MIUI優化,手機卡出翔,很不流暢。


於是有了今天這篇:


問題:



AS提示: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?

原因:

原因很簡單:我們使用了com.android.tools.build:gradle:2.3.0,就是android 插件版本的原因,小米部分手機出問題



解決:

知道原因了,解決很簡單:只要在build.gradle文件裏,降低android插件版本就行,例如降爲 2.2.3。如下






另外,我的gradle-wrapper是用的3.3版本,如圖:


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章