可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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:
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
回答2:
I right-clicked above the manifest.xml file, selected option Run As -> Run Configurations -> on a tab Target, and selected AVD created. I'm using Eclipse Helios for Linux 32b,
回答3:
I right-clicked above the manifest.xml file, selected option Run As -> Run Configurations -> on a tab Target, and selected AVD created
回答4:
I had this problem myself, confirm that you have a Virtual Device on your AVD. My Error occurred simply because I did not have any Virtual Device.
Another thing to consider is that, If you have your Virtual device, remember to always install the SDK before you start your AVD. I had overlooked this and wasted a lot of time wondering why my AVD is not working. how do you expect your virtual device to work with no OS..
This are just a few problems that beginners will always encounter when starting out...
My advice be keen to detail don't rush into running your Hello World application
回答5:
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!
回答6:
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.