Error when creating AVD

Beamen

Member
Joined
Nov 11, 2009
Messages
35
Reaction score
0
I'm wondering if anyone can help with this. I'm learning Android Dev with Eclipse and trying to run the 'hello world' but when I try to run 'android create avd -t 4 -n my_avd' in the command prompt i get the following error,

'java' is not recognized as an internal or external command,
operable program or batch file.
SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.

Any help will be much appreciated!
 
OP
Beamen

Beamen

Member
Joined
Nov 11, 2009
Messages
35
Reaction score
0
I'm wondering if anyone can help with this. I'm learning Android Dev with Eclipse and trying to run the 'hello world' but when I try to run 'android create avd -t 4 -n my_avd' in the command prompt i get the following error,

'java' is not recognized as an internal or external command,
operable program or batch file.
SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.

Any help will be much appreciated!
 

GuyWithDogs

New Member
Joined
Nov 11, 2009
Messages
17
Reaction score
0
Location
Poulsbo, WA
Jumping in with little relevant experience with Android SDK, but a fair bit of Eclipse usage...

Sounds like your Eclipse setup isn't quite correct - have you compiled other programs with it, or is this a totally fresh install for Eclipse and the SDK stuff? From the sounds of things, (and I'm assuming some sort of Windows development platform - if not, ignore me completely) Eclipse can't find your Java compiler on your system. Which means either it's not set up on the PATH environment variable, or it's not configured in the Eclipse configuration. Same thing with respect to ANDROID_SWT -- sounds like some sort of environment variable is being referenced and is missing.

You may need to do a bit more digging on how to set up your development environment to get things working. Sorry - that's vague, I know, but a lot depends on the Java you're using, and the operating system.
 

Stigy

Active Member
Joined
Nov 5, 2009
Messages
1,078
Reaction score
0
Location
New Jersey
Have you integrated the tools and followed all instructions for using Eclipse?

Seems like it can't find a jar file associated with the Android Developer Tools.

I would just run through the Eclipse/ADT instructions one more time to see if you looked over a step or something just didn't happen correctly.
 
OP
Beamen

Beamen

Member
Joined
Nov 11, 2009
Messages
35
Reaction score
0
New install of eclipse galleleo (sp?) new install of android SDK, this is my first attempt. I put "C:\Users\Beamen\Android\android-sdk-windows\" in my system PATH. OS is Windows Vista Home Premium.... :( I know, its home. but I'm trying to save up for Win 7 pro. That may disappoint you Mac guys, but if you're that into mac you should be using that iphone thing that the ignorant masses are using.. didn't mean to offend anyone, of-course
 
OP
Beamen

Beamen

Member
Joined
Nov 11, 2009
Messages
35
Reaction score
0
I'll un-install everything and then re-install and pay close attention to the instructions. I did however create an AVD using the GUI, But still can't using command line.
 

GuyWithDogs

New Member
Joined
Nov 11, 2009
Messages
17
Reaction score
0
Location
Poulsbo, WA
I haven't done the Android SDK yet - that's this weekend, hopefully. But I'd guess you're missing an environment variable for ANDROID_SWT, and I think your PATH environment variable should be checked to see that something like (assuming defaults) C:\Program Files\Java\jdk1.6.0_14\bin is on the path...

You DID install a Java Development Kit, too, right? I don't think Eclipse installs that by default. You'd get that at java.sun.com...
 
OP
Beamen

Beamen

Member
Joined
Nov 11, 2009
Messages
35
Reaction score
0
I uninstalled and deleted the Android SDK, Eclipse, and Java Dev kit. The redownload, and installed them all again and payed close attention to the instructions. Now it works. Thank you all for your help. I really appreciate it!
 

dlp211

New Member
Joined
Nov 14, 2009
Messages
1
Reaction score
0
Hey,

I was having the same problem using the CLI....but being awesome if you go:
Window > Android SDK and AVD Manager

That will allow you to update the SDK to the newest version and start a new AVD. Much simpler then the CLI.
 
OP
Beamen

Beamen

Member
Joined
Nov 11, 2009
Messages
35
Reaction score
0
The GUI is much easier than the CLI. Thank for the help!
 
Top