开发者

Attempt to debug my test project consistently hangs at "Running tests..." step

开发者 https://www.devze.com 2023-01-17 23:32 出处:网络
I have an Android project that I have been working on and debugging just fine for several months, but for some reason it is now consistently hanging at the \"Runnning tests...\" step.I have experience

I have an Android project that I have been working on and debugging just fine for several months, but for some reason it is now consistently hanging at the "Runnning tests..." step. I have experienced intermittent hangs from the beginning, but a simple retry and/or restart of Eclipse or the emulator usually resolves it. But now I am just dead in the water.

I can run my tests fine, and I can debug my actual program, but I can't debug my tests.

I have tried creating a new emulator and that doesn't fix it. I also cleared all my breakpoints and that had no effect.

As far as what has changed lately, the primary thing is that I upgraded to rev 7 of the SDK tools. Also, I recently did some debugging (of the program not the tests) on an ac开发者_如何学Gotual device (not the emulator). Can't see how that would impact it but I thought I would mention it.

Actually I had to set Debuggable to "true" in the app manifest to get device debugging to work. Although I have never had that set in my test project, I set it, and that also had no effect on the issue.

I'm running out of ideas, and I would greatly appreciate some pointers. Thanks.


I'm pretty sure the root cause here was that I had screwed up my SDK upgrade. The problem pretty much went away when I deleted the directory for the previous SDK version, then discovered Eclipse was still trying to access stuff from there. I then went back through the upgrade steps, and now it seems to be working.

One other trick I did stumble onto, for what it's worth, was to set my DDMS logging level to Verbose in Preferences. Then when it would hang up I could see which adb command was giving trouble and run that from the command line. This produced slightly bizarre behavior (the debugger was connected but the test steps didn't update in Eclipse), but it got me debugging.

Just thought I would update with what I know, in case someone else finds themselves in a similar situation. The moral of the story: pay attention to the documented steps to upgrade :-).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号