使用安卓调试:"waiting for debugger to attach"



当我尝试使用 Eclipse 调试我的 Android 应用程序时,模拟器启动并显示以下消息:"应用程序打开连接正在等待调试器附加",我在控制台中收到以下消息:

[2012-04-26 12:12:24 - openconection] ------------------------------
[2012-04-26 12:12:24 - openconection] Android Launch!
[2012-04-26 12:12:24 - openconection] adb is running normally.
[2012-04-26 12:12:24 - openconection] Performing   org.anddev.android.getdatafromtheweb.GetDataFromTheWeb activity launch
[2012-04-26 12:12:24 - openconection] Automatic Target Mode: Preferred AVD 'emul' is   not available. Launching new emulator.
[2012-04-26 12:12:24 - openconection] Launching a new emulator with Virtual Device 'emul'
[2012-04-26 12:12:33 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-04-26 12:12:33 - openconection] New emulator found: emulator-5554
[2012-04-26 12:12:33 - openconection] Waiting for HOME ('android.process.acore') to be launched...
[2012-04-26 12:13:08 - openconection] HOME is up on device 'emulator-5554'
[2012-04-26 12:13:08 - openconection] Uploading openconection.apk onto device 'emulator-5554'
[2012-04-26 12:13:09 - openconection] Installing openconection.apk...
[2012-04-26 12:13:29 - openconection] Success!
[2012-04-26 12:13:29 - openconection] Starting activity  org.anddev.android.getdatafromtheweb.GetDataFromTheWeb on device emulator-5554
[2012-04-26 12:13:30 - openconection] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=org.anddev.android.getdatafromtheweb/.GetDataFromTheWeb }
[2012-04-26 12:13:31 - openconection] Attempting to connect debugger to 'org.anddev.android.getdatafromtheweb' on port 8656
[2012-04-26 12:13:51 - openconection] Launch error: Failed to connect to remote VM. Connection timed out.

端口有问题吗?我将此代码添加到我的清单文件中

 <uses-permission android:name="android.permission.SET_DEBUG_APP"></uses-permission>

编辑:我有一个名为"emul"的默认模拟器,我不知道为什么它可以启动(通过日志)

Automatic Target Mode: Preferred AVD 'emul' is   not available. Launching new emulator.

关闭可能使用调试端口的其他应用程序。如果使用 eclipse 和其他 SDK,则可能需要关闭其他 SDK。祝你好运。

相关内容

最新更新