当我尝试使用 Eclipse 调试我的 android 应用程序时,模拟器启动并显示此消息:“Application openconnection is waiting for the debugger to attach”,我在控制台中收到此消息:
[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.