views:

863

answers:

3

I'm trying to set up my workstation for Android development with Eclipse Galileo. I installed the latest ADT plugin and the Android SDK, but I get this error when I try to run any basic Android project I create.

eclipse.buildId=M20090917-0800 java.version=1.6.0_17 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product -data C:\Documents and Settings\dmcnamar\workspace -product org.eclipse.epp.package.java.product

Error Tue Jan 26 18:00:41 EST 2010 An internal error occurred during: "Launching HelloWorld".

java.lang.NullPointerException at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launch(Unknown Source) at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.doLaunch(Unknown Source) at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(Unknown Source) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

+1  A: 

The app worked fine when I pushed it to a physical device, so I figured I'd check the virtual devices some more. From running "adb.exe devices" I see a virtual device in there called ""emulator-5554". When I select this one to run I get the error still, but when I choose "Launch New Virtual Device" I get it to work. When I run "android list avds" it doesn't display the first device, so it looks like a bad device got created somehow causing the error. Thanks for the help!

A: 

This might already be solved, but in case someone else stumbles on the same issue. I solved it by making a copy of the project, delete it from the workspace and import it back again. Now it all works like a charm. I believe this started after I removed a virtual device from AVD manager.

Mikael Setterberg
A: 

In my case, the problem went away when I chose an AVD. I was using an eclipse project and the run configuration had a valid AVD but it was not checked. Once I checked the checkbox, the problem went away.

Regards Kamesh

Kamesh Kompella