本來想調出MMDS,沒想到報出這個錯誤: 最後發現原來是自己選Android Device Monitor不小心把Enable ADB Integration前面的√去掉了。點擊工具欄中的Tools,選中Android,最後點擊Enable ADB Integration,使其前面出現✔號就OK了, ...
本來想調出MMDS,沒想到報出這個錯誤:
最後發現原來是自己選Android Device Monitor不小心把Enable ADB Integration前面的√去掉了。點擊工具欄中的Tools,選中Android,最後點擊Enable ADB Integration,使其前面出現✔號就OK了,
原因:
這個是由於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還在運行的時候,就可以直接改變它的內部代碼
開發者可以不用再等待整個應用程式重建以及每次代碼更改後重新部署
簡單來說就是改了代碼後,點擊即時運行,模擬器上的應用不需要重啟就可以直接呈現出我們修改後的代碼效果!