为什么应用程序在未连接到计算机时等待调试器?

Ted*_*Ted 74 android

似乎我在Android世界中采取的每一步都遇到了问题.我很快就会在StackOverflow上提出20个问题hehe =)

通常,我通过USB将HTC Hero连接到计算机,然后以调试模式或正常模式启动应用程序.

So, the last time I ran the app in normal mode. Then I disconnect the device (I want to try to have it "free", not connected to computer) and I start the app from the menu. When I do that I get a popup saying "Application xxx is waiting for the debugger to attach" and there it stops and eventually dies.

Why is it waiting for the debugger, when the last time I ran the app (while connected) I didnt run it as Debug?

Regards


EDIT 1: I might add this little weird fact:

If I do "Run" (green/white arrow) when the device is connected I STILl get a popup on the device saying "Application xxx is waiting for the debugger to attach"...


EDIT 2: Found this page. He restared his device and that worked for me too. Stupid not to try that right away...

Ted*_*Ted 141

只是为了结束这个问题:我重启了设备,这有所帮助.

  • 同样的问题在这里 我无法相信设备重启是唯一的解决方案.. (7认同)

小智 40

对我来说,解决方案是在"开发者选项" - >"调试" - >"选择调试应用程序"中选择"无",尽管它已经选择了"无".似乎设备在我的应用程序之前的某个时间放置了"需要调试"标签,当我使用我的IDE在设备上"运行"应用程序时(或者当设备未连接到PC时手动启动应用程序) ,并重新选择"无"删除标签.不知道是不是这样.


小智 15

重启是花费更多时间,更简单的方法是在设备中选择"开发者选项">"选择调试应用程序"并选择"无".


Lar*_*ars 5

另外,不要忘记在"开发选项"下进入Android设置并取消选择"等待调试器"