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.
Related
I have just installed Android SDK to my Eclipse, but when I run a simple program on Eclipse I get following error.
[2012-05-02 11:15:11 - Emulator] invalid command-line parameter: and.
[2012-05-02 11:15:11 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2012-05-02 11:15:11 - Emulator] please use -help for more information
I added ADT plugin to Eclipse and also set path for Android SDK as
C:\Documents and Settings\ganesh\android-sdk_r12-windows\android-sdk-windows
Where did I go wrong?
Thanks
Ganesh.
Android sdk path can't contain any spaces.So your path
C:\Documents and Settings\ganesh\android-sdk_r12-windows\android-sdk-windows is wrong.
Put your sdk in a path like c:\android-sdk that containes no space.
I second Rasel, another workaround is changing the "SDK Location" in the Android Preferences in Eclipse to its corresponding 8dot3 directory name, As here "Documents and Settings" is causing the problem, change it to its corresponding 8dot3 directory name, that would probably be DOCUME~1 so the comple path would be
C:\DOCUME~1\ganesh\android-sdk_r12-windows\android-sdk-windows
If you don't know the 8dot3 name of your desired path, just use command prompt and execute "DIR /X"
Its a very commmon issue and a bug with Android SDK. "Documents and Settings" have spaces and it breaks it.
You have 2 options
Re-Install SDK and avoid having spaces in the folders.
instead of Documents and Settings replace it with DOCUME~1 if not then DOCUME~2 (some dos path)
e.g. C:\DOCUME~1\ganesh\android-sdk_r12-windows\android-sdk-windows
I hope you'd like the secound option as you don't have to re-install SDK again. It works for me.
When I launch my emulator, I get the following error:
invalid command-line parameter: Android Development\android-sdk_r12-windows\android-sdk-windows\tools/emulator-arm.exe.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
But my emulator is mark as "A valid Android Virtual Device".
How should I solve this error?
UPDATE:
i just solved this problem.
See answer below.
check your sdk path. Make sure the path should not have an empty space like ..../my Sdk/sdk-windos/
It's my mistake that I named my folder "Android Development" where I have put my sdk. I realized that having a path that have an empty space between letters or words, like in my case "Android Development" have caused this error.
I just transferred my android sdk to another folder and make sure that i named it properly(without blank space), for example "Android_Development".
Remove the blank space from your SDK path by renaming the path(if blank space is there)
or give proper command
emulator -avd "avdname"
note: AVD must exist with name "avdname"
There is one more aspect to this problem. If RAM size is more than the AVD can get from system, the same error is thrown.
I've just installed Eclipse with fresh Android SDK and ADT on Windows 7 x64 Professional. I've created an emulator and tried to start it, but starting fails with this message:
invalid command-line parameter: Files.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
When I create another emulator, it also fails to start with the same message. Can anyone provide a solution? Thanks in advance.
Change the path of Android SDK to make sure it has no spaces, for example use Progra~1 instead of Program Files.
Don't use a path that contains withespace for the SDK installation.
You can also try from command line:
emulator #foo
considering that your PATH includes the SDK installation directory.
even if i'm trying just a simple android "hello world" program. On debugging following problem popping up..
" the android emulator process has unexpectedly stopped running. the instance and2.2 (its the name of avd i hd created) is now stopped.
Reason:
The emulator process terminated unexpectedly: invalid command-line parameter: Files.
Hint: use'#foo' to launch a virtual device named 'foo'.
please use -help for more information"
it's probably because the path is in Program Files or something on Windows. Put the android sdk folder into a path without a space.
sdk path can't contain spaces.May be you changed your sdk path to somewhere like c:/program files/...Which contains spaces.Please place it in a directory which contains no spaces
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