当我尝试使用eclipse调试我的Android应用程序时,模拟器启动并显示此消息:“应用程序openconnection正在等待调试器附加”,我在控制台中收到此消息:
[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.
答案 0 :(得分:0)
关闭可能使用调试端口的其他应用程序。 如果你使用eclipse和其他SDK,你可能需要关闭其他人。 祝你好运。