錯誤訊息
Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled
快速解決
- 開啟 Settings/Preferences → Build, Execution, Deployment → Debugger → 勾選 Enable ADB integration。
- 若已勾選仍報錯,嘗試 File → Invalidate Caches / Restart。
- 關閉 Instant Run:Settings → Build, Execution, Deployment → Instant Run 取消勾選 Enable Instant Run,重啟 AS。
根本建議:改用真機調試
AVD 模擬器效能差、佔記憶體、兼容性問題多。強烈建議:
- 開啟手機「開發人員選項」→「USB 偵錯」。
- 用原廠數據線連接電腦,安裝對應驅動(如 Google USB Driver、廠商驅動)。
- AS 底部裝置列直接顯示手機型號,點擊 Run 即可,速度快、環境真實。
若必須用模擬器
- 使用 x86 映像 + HAXM 加速(Intel CPU)或 Hyper-V (Windows 10+ AMD/Intel)。
- 分配足夠 RAM(建議 2GB+)、啟用 GPU 加速。
- 考慮第三方模擬器:Genymotion、LDPlayer、MuMu,效能優於官方 AVD。