Android Studio 出現:
Executing tasks: [:app:assembleDebug]
Gradle build finished in 2s 196ms
Session 'app': Error Launching activity
關于標題問題網上能搜索到的相關網頁大部分都是 Eclipse 下的解決方法,如:
修改 ADB connection time out(ADB的超時時間)設置。
Window->Preferences->Android->DDMS。
現在提供兩種在 Android Studio 中出現該問題的解決辦法:
- 手動更新 Gradle 插件。
本辦法用于解決可能是由于打開 Android Studio 后網絡原因自動更新 Gradle 插件失敗所導致的。
Tools -> Android -> Sync Project with Gradle Files
2.重新勾選 Enable ADB Integration。
本辦法用于第 1 條無法解決的情況下使用。
Error running app: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled.
Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences.
Can't bind to local 8600 for debugger
你的主機中的軟件中止了一個已建立的連接。
3.另附一個相關問題鏈接。
https://segmentfault.com/q/1010000004951263
stackoverflow地址