今天在開發時用Android studio debug方式往真機上安裝app時爆出了Installation error: Unknown failure
後來試了不少種網上說的方法嘗試解決,包括:app
使用 adb kill-server
和 adb start-server
優化
重啓計算機spa
而後我甚至重裝了SDK和Android studio 都無濟於事.net
後來看到網上有人說關閉小米的MIUI優化就能夠了,試了試果真行了! 若是哪位是用小米真機調試的也出了這個錯誤能夠試試,這個不大不小的坑害我填了一下午,浪費時間,並且很詭異的是前一陣我調試時這個MIUI優化一直開着,也沒出問題,就是今天我把Android studio升級到了2.3之後問題就出現了,不知道具體是什麼狀況debug
另外我看還爆出了另外一個警告,不知道和這個有無關係,先記錄一下調試
16:38 Instant Run detected that you are running on a target device that has a work profile or multiple user accounts. Launching the app under a work profile or another user account on the target device will result in a crash. Learn more about how to run your app under a work profile.