AndroidStudio部署项目时出现错误:Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled
結果在部署項目到模擬器的時候出現了錯誤:Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled
原因
這個是由于Android Studio2.0新版本中的Instant Run (即時運行)引起的,什么是即時運行呢?
Instant Run in Android Studio 2.0 allows you to quickly make changes to your app code while your app is running on an Android device or Android Emulator. Instead of waiting for your entire app to rebuild and redeploy after each code change, Android Studio 2.0 will try to incrementally build and push only the incremental code or resource change. Depending on the code changes you make, you can see the results of your change in under a second. By simply updating your app to use the latest Gradle plugin ( 'com.android.tools.build:gradle:2.0.0-beta2’ ), you can take advantage of this time saving features with no other modifications to your code.
它可以快速的更改運行在Android虛擬機中的APP,也就是說在Android虛擬機中的app還在運行的時候,就可以直接改變它的內部代碼
開發者可以不用再等待整個應用程序重建以及每次代碼更改后重新部署
簡單來說就是改了代碼后,點擊即時運行,模擬器上的應用不需要重啟就可以直接呈現出我們修改后的代碼效果!
有關即時運行的google官方文檔:
http://tools.android.com/tech-docs/instant-run
解決方法
點擊工具欄中的Tools,選中Android,最后點擊Enable ADB Integration,使其前面出現?號就OK了
總結
以上是生活随笔為你收集整理的AndroidStudio部署项目时出现错误:Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Fragment的setUserVisi
- 下一篇: AndroidStudio导入新项目一直