I attempted to program my first app; "Hello World" and I already encountered a bug I cannot fix. When I run the program I get:
invalid command-line parameter: Files.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
Does anyone know what this means and how I can fix it?
I think your main problem is you installed your android sdk in a path where there is a space in the address.If you install the sdk in "C:\Program Files\Android\android-sdk",then you will surely get that issue.Try to use any directory which does not contain any space in it like C:\Android\android-sdk .
Or try to run the AVD from the command line like this C:\Progra~1\Android\android-sdk.
Hope this will help you.
I updated the Android SDK tools from revision 11 to revision 12, and the emulator now fails to start. When I try to run emulator.exe, I get:
invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
The path to emulator.exe is C:\Program Files\Android\android-sdk\tools.
How do I fix it?
As was previously suggested, it does seem to be caused by the fact that there is a space in the default installation path of the Android SDK: C:\Program Files\Android\android-sdk\
There are a couple of possible solves, though-
move installation directories to paths that do not contains spaces (as already mentioned)...
but simpler and possibly slightly less cumbersome is simply adjusting the path in Eclipse to use 8-dot-3 directory name(s). Since I'm running Win7, I have two Program Files directories, the second one being "Program Files (x86)" which is where the sdk installed. So the 8-dot-3 path is PROGRA~2. Thus, I simply changed the "SDK Location" value in the Android Preferences in Eclipse from C:\Program Files\Android\android-sdk\ to C:\PROGRA~2\Android\android-sdk\ and everything now works fine.
If you don't know the 8-dot-3 name of your desired path, just fire up a Command Prompt and execute "DIR /X"... the short name will be displayed next to each directory.
Same problem for me, though this is my first time trying to work with Android SDK in general. I believe the problem is with the location of the SDK. Note the "paramater" "Files\Android\android-sdk\tools/emulator-arm.exe." I believe there is a bug in google's code where it doesn't have the directory the SDK is located in in quotes, meaning, if there is a space anywhere in the directory name, it won't work. Can someone with their SDK in a directory with no spaces confirm my theory?
To work around the issue, you can call "C:\Program Files\Android\android-sdk\tools\emulator #foo" from the command line, where "foo" is the name of your emulator.
I got this problem just now, and I found a solution.
My path to the emulator-arm.exe is C:\Program Files\Android\android-sdk\tools. When I try emulator-arm #my_avd from the command line (my_avd is my Android Virtual Device name), it works.
I fixed this problem on Windows XP. Just cut from "C:\Program Files\Android\android-sdk" and paste content directory to "C:\Android\android-sdk". Set my system varaible 'ANDROID_HOME'="C:\Android\android-sdk". Set path to Android SDK in Eclipse as "C:\Android\android-sdk". That's it!
Everything works fine.
Since the cause of this issue is the space within filepath names of the Windows install directory then another workaround is to use the file short names (i.e. 8.3 alias filenames).
Specifically, if root install directory for Android SDK is
c:\Program Files\.. then use c:\PROGRA~1\..
or if
c:\Program Files(x86)\.. then use c:\PROGRA~2\..
You can then launch the SDK Manager via the command-line by running:
start c:\PROGRA~2\Android\android-sdk\tools\android.bat
Fixed in r13. Update your SDK Tools!
I think you are saying you changed the minSDK version of your app and now the emulator wont run...? this is because your emulator is the wrong version... assuming you changed the minSDK of your app correctly, all you need to do is create a emulator with the same SDK version. Open the Android SDK / AVD manager (icon top right of screen next to print token) and create a emulator with minSDK 12.
Moving your Android SDK folder to somewhere that the complete path will be without white spaces will fix the problem.
I also got this problem after updating SDK Tools from revision 11 to 12.
I found it was a problem with a space in the upper directory name where android-sdk-windows resides, then I copied both 'eclipse' and 'android-sdk-windows' directories from my 'Program Files (x86)' to the root of drive D:.
All is solved now!
As an alternative to PROGRA~2 method (which is not working for example in Intellij IDEA), you can create a symlink named, for example, prg to Program Files (run mklink /? from command line to learn how to do it), then run emulator as C:\prg\Android\android-sdk\tools\emulator.exe. Change path to SDK/emulator in your IDE also.
I had a same problem when I setup r12. I found out this problem was caused by blank spaces in the path you setup android SDK. The solution is that you should move the folder of android SDK to a place without spaces, in your case : E:\andriod-sdk or D:\abc\xyz\android-sdk.
Today I have started with setting up of Android Development Environment using Eclipse for java developers, Android SDK and ADT Plugin on Windows 7 exactly following the steps given on http://developer.android.com/resources/tutorials/hello-world.html but I'm stuck in between. I have written HelloAndroid application in same way as described on this link but when I'm running this code then it is not working. Following errors are shown in red:-
[2011-07-11 23:25:36 - Emulator] invalid command-line parameter: Files.
[2011-07-11 23:25:36 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-07-11 23:25:36 - Emulator] please use -help for more information
It's a new bug. You have to install your android sdk to a path that doesn't contain spaces. So c:\program files\android would fail, try c:\android.
Alternatively, you could first run your emulator by browsing to your androidsdk\tools folder, and open a command prompt there. Then use
emulator #foo
where foo is your avd name.
(You can also ofcourse, if you have one, deploy the application on your android phone, generally faster and easier to use)
I am the beginner for android development. I followed the procedure as specified in developer.google.com . for installing I Tried to create AVD(Android virtual device) through command path. I executed at command prompt.
android create avd --target 2 --name my_avd
But the Error is coming "Error: Target id is not valid. Use 'android.bat list targets' to get the target ids."
After executing android.bat list targets is showing blank. I am not able to figure out the problem as I have already set the path also.
THe problem is resolved. windows by default is not loading api for android virtual device. we need to manually start the downloading of those. follow this procedure:
go to android List item sdk folder which u have extracted. to the tools folder
un android batch file a api would be loaded. Here go to settings and mark "Force https to fetch from http".
Then go to availabe packages and amrk the link provided and install it.
after following this procedure all the above specified errors would be resolved.
I think you use "android create avd -n xxx -t 2" to create AVD, and use "android.bat list targets" to find the creation result.
You should use "android list avds" to list AVD. Targets is different from virtual devices.
You may have no targets installed. Check available packages in sdk manager and install some.
As per dtmilano, install some packages [images of the different Android OS versions]. This is an easy step to miss.
FYI: here are the end-to-end steps for installing an app on the emulator using the cmd line tools on MacOS (I assume win64 is equivalent):
http://richardboardman.com/2011/07/100-days-of-tech-day-1-android-dev-tools/
I have installed Android SDK on my MAC OS X 10.6 and facing lots of problem while creating AVD.
When I tried to create it for ECLIPSE (3.5 Gallelio) then after clicking the 'new' button, when I try to type a name there comes a message bellow saying 'a target must be selected in order to create an AVD'. But the problem is, the Target field is deactivated.
If I'm trying to create AVD from terminal with the command './android avd --target 2 --name my_avd' it shows an error saying 'Error: Expected verb after global parameters but found 'avd' instead.'
I don't understand what to do right now. Can anybody help me in this regard please??
Thanks
First you have to specify the Android SDK installation folder to the Eclipse Android plugin. Go to Preferences -> Android and set it. After that you have to install the target versions you want to develop against.
Go to AVD Manager -> Available Packages and download the targets that you need. After that you should be able to create your AVD. If you still have problems, try restarting Eclipse because that solved some issues for me a number of times.
If you still have problems try reading the Troubleshooting Tips.
You have the command line wrong. You need to add create to it. Try the following:
android create avd --target 2 --name my_avd