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.
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.
I have installed android sdk in C:\Android\andoird-sdk-windows.I have created one sample application..While launching the emulator,
it is giving error as:
Invalid command-line parameter: New.
Hint: use '#foo' to launch a virtual device named 'foo'.
please use -help for more information
There is no white space in the folder structure where I have installed android sdk..I am new to Android development..Please help me.
Thanks in advance,
Nagendra Shasthri S
Do you have a space in the name of the virtual device? Try to create a new one in the AVD manager, without spaces in the name.
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 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.