Android Studio

Session 'app': Error Lau

2016-04-28  本文已影响2141人  捡书的腾腾

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。

增大 ADB connection time out(图片来源见水印)

现在提供两种在 Android Studio 中出现该问题的解决办法:

  1. 手动更新 Gradle 插件。
    本办法用于解决可能是由于打开 Android Studio 后网络原因自动更新 Gradle 插件失败所导致的。

Tools -> Android -> Sync Project with Gradle Files

更新 Gradle 插件

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地址

上一篇下一篇

猜你喜欢

热点阅读