views:

116

answers:

2

Hi,

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!

A: 

I've just been running into this problem. It was driving me crazy.

As a last resort, I tried running the tests on my NexusOne device, instead of the emulator. They did run through completion.

I then tried on the emulator again and, to my surprise, they worked.

Not very confidence inspiring, I know, but worth a try.

Good luck!

Marcelo Camelo
I also tried resolving this issue last weekend and just posted what I found. Still kind of workaround, but better than got stuck. Thanks!
tamcy
A: 

I determined to resolve this issue last weekend. The trials are quite frustrating but it seems to be finally working. Below is what I did:

  • The machine I am using for development is Windows 7 Ultimate (64-bit).
  • I decided to start over again by reinstalling all the components.
  • Firstly the latest Java Runtime. I decided to use 32-bit Java (hoping) for better compatibility.
  • Then I followed the step-by-step tutorial in the Android SDK page. To my surprise on the Eclipse ADT page I suddenly saw the following message:

Caution: There are known issues with the ADT plugin running with Eclipse 3.6. Please stay on 3.5 until further notice.notice.

  • Not sure I overlooked this message or not, by anyway. So Helios is not guaranteed, I downloaded Galileo and install the ADT plugin (which turns out my decision to install 32-bit Java was correct, as Galileo only offers x86 build)

Unfortunately, this still won't work. But after some trial and error I found a way to kick the test case working, which is:

  1. First, start the application to be tested in Debug mode. The DVM should boot, and the debugger should attach successfully.
  2. Do NOT close the DVM. Go select the test case and click the debug run button.

This way the DVM won't stuck at the Sending WAIT chunk message, and test cases can be run.

Hope this helps.

tamcy