Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Android project in Eclipse suddenly doesn't work anymore

I am developing on Windows machine.

I was working quite well until yesterday, when I saw the the update prompt and updated my ADT plugin.

Today when I tried debugging my test project, I experienced either one the following cases:

1) Logcat stops forever on the message "sending wait chunk".

The console reads:

[2010-08-15 19:05:58 - TestProject] Project dependency found, installing: Project  
[2010-08-15 19:05:58 - Project] Uploading Project.apk onto device 'emulator-5554'  
[2010-08-15 19:05:58 - Project] Installing Project.apk...  
[2010-08-15 19:06:08 - Project] Success!  
[2010-08-15 19:06:08 - ProjectTest] Launching instrumentation  android.test.InstrumentationTestRunner on device emulator-5554
[2010-08-15 19:06:08 - ProjectTest] Collecting test information  
[2010-08-15 19:06:14 - ProjectTest] Sending test information to Eclipse  
[2010-08-15 19:06:14 - ProjectTest] Running tests...  

And Logcat reads:

D/ActivityManager(   84): Uninstalling process com.mat.project  
I/ActivityManager(   84): Start proc com.mat.project for added application com.mat.project: pid=341 uid=10029 gids={3003, 1015}  
I/System.out(  341): Sending WAIT chunk

I have to terminate the AVM manually. This is the most frequent case.

2) Logcat shows the following message, and test project fails:

[2010-08-15 18:42:40 - (My project)] Test launch failed: Could not connect to:  : 51154
[2010-08-15 18:42:40 - (My project)] Connect to Eclipse test result listener failed

3) Eclipse stops responding.

The above cases happens even when the test unit contains nothing.

Also it just doesn't not work in debug. The test case runs successfully if it is not in debug mode (But there are still some glitches, like Logcat sometimes won't emit debug messages).

I have tried the followings, but still no luck:

  1. Reinstall the Android SDK
  2. Download the latest version of Eclipse and download the ADT plugin again
  3. Running Eclipse with -clean switch
  4. Clean the test and test target projects and build again
  5. Switched to a new workspace and configure my projects again
  6. Clear user data while start debugging in the AVM
  7. Configure a new AVM

It would be grateful if anyone can shed a light on me.

Thanks in advance!

like image 356
Edmund Tam Avatar asked Aug 15 '10 11:08

Edmund Tam


1 Answers

[2012-09-18 18:03:57 - NotePadTest] Test launch failed: Could not connect to:  : 52122          
[2012-09-18 18:03:57 - NotePadTest] Connect to Eclipse test result listener failed

or

Launch error: Failed to connect to remote VM

I'v met the same problem and I solved it as below:

Preferences-General-Network Connections-Direct

Hope this helps.

like image 134
YLinXin Avatar answered Oct 03 '22 00:10

YLinXin