運行Android Studio時,APP安裝失敗--Installation failed with message Failed to establish session.

問題:

Installation failed with message Failed to commit install session 563460486 with command cmd package install-commit 563460486. Error: INSTALL_FAILED_USER_RESTRICTED: Install canceled by user.
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?

解決辦法:

1.在編輯器依次點擊File->Setting->Build->Instant Run(圖片非本人截圖)

2.再次運行程序,還會出現     Session 'app': Install failed.Installation failed ,Rerun

在手機開發者選項界面中,最後一排有個“啓用MIUI優化” ,默認是開啓,把這個選項關掉,會提醒重啓,重啓後就好了

 

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