Whenever I run the project an error is displayed. It says:
[2011-07-18 13:36:34 - Emulator] invalid command-line parameter: Files\android-sdk\tools/emulator-arm.exe.
[2011-07-18 13:36:34 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-07-18 13:36:34 - Emulator] please use -help for more information
I am not getting what's wrong.
I also faced same issue. There is a bug with Android v12. See this discussion for your solution. And I followed Carl S answer. Now its working fine.
Related
I'm a freshman for the android developing, and I met a question that confuse me for a few days.
I run the simple "hello world" code (I promise there is no error in the code, cause I copy it directly from the homepage of SDK), then the emulator runs but my app is not installed in it. and the console is like this:
[2012-06-12 23:05:50 - HelloPig] ------------------------------
[2012-06-12 23:05:50 - HelloPig] Android Launch!
[2012-06-12 23:05:50 - HelloPig] adb is running normally.
[2012-06-12 23:05:50 - HelloPig] Performing com.example.hellopig.HelloPigActivity activity launch
[2012-06-12 23:05:50 - HelloPig] Automatic Target Mode: launching new emulator with compatible AVD 'aaa'
[2012-06-12 23:05:50 - HelloPig] Launching a new emulator with Virtual Device 'aaa'
[2012-06-12 23:05:55 - Emulator] emulator: emulator window was out of view and was recentered
[2012-06-12 23:05:55 - Emulator]
It just keep holding there, I think there should be something like installing app and success. I firstly thought the problem is eclipse cannot find my emulator, but there is no error. I have checked the build debug keystore path, it is the place where my emulator is.
I also have checked the environment variables, but I think there is no problem with them
(I can run java and adb in cmd)
I really have no idea, so could anyone help me?
following are the versions of the softwares:
jdk 1.6
ADT 18.0.0
SDK platform 1.5
eclipes java EE IDE for developers
Looking forward to hearing from anyone of you :)
I would suggest starting your emulator before trying to install your app. It looks like you are waiting for Android to start your emulator for you.
Otherwise there isn't enough information here. I would suggest running logcat (open a command prompt, and type 'adb logcat') which will give you more verbose logging information.
Post the output from your logcat (if your problem isn't immediately obvious).
Does not pop up the emulator. however, I see the following error message instead.
[2011-11-10 21:03:19 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
[2011-11-10 21:03:19 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-11-10 21:03:19 - Emulator] please use -help for more information
Thanks StackOverflow
It's because you've installed the android sdk into your Program Files folder. You should install it into a path with no spaces, C:\android-sdk or something.
To break it down, it's calling the executable without quotes around the path to the file, i.e. C:\Program Files\Android\android-sdk\tools/emulator-arm.exe is viewed without quotes as calling the program C:\Program with the parameter of Files\Android\android-sdk\tools/emulator-arm.exe. It's a simple flaw that they haven't fixed in several versions. It's especially problematic sense the installer naturally wants to install in Program Files by default.
I am getting this error when I am trying to launch my first Hello World Android application. I am doing the tutorial based on Sams Teach Yourself Android Application Development in 24 Hours.How can I resolve this?
[2011-08-18 02:33:28 - droidapp] ------------------------------
[2011-08-18 02:33:28 - droidapp] Android Launch!
[2011-08-18 02:33:28 - droidapp] adb is running normally.
[2011-08-18 02:33:28 - droidapp] Performing com.droid.app.DroidappActivity activity launch
[2011-08-18 02:33:28 - droidapp] Automatic Target Mode: Preferred AVD 'firstdroid' is not available. Launching new emulator.
[2011-08-18 02:33:28 - droidapp] Launching a new emulator with Virtual Device 'firstdroid'
[2011-08-18 02:33:30 - Emulator] invalid command-line parameter:
Files\Android\android-sdk\tools/emulator-arm.exe. [2011-08-18 02:33:30
- Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-08-18 02:33:30 - Emulator] please use -help for more
information
Change the path of the SDK your path to Program Files\Android\android-sdk tools/emulator-arm.exe. Put the SDK directly in the drive, that is, d:\Android\android-sdk-tools\emulator-arm.exe.
Note: also remove spaces from the path by renaming the folder name.
Use Eclipse and the Android plugin to make this via a graphical user interface. That would be better for a newcomer.
I'm having a bit of an issue with the emulator launching from Eclipse. I have everything set up to the letter as far as I can tell and I'm just following the Hello, World example and when I try and run it after setting up the emulator I get this:
[2011-08-18 17:43:16 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
[2011-08-18 17:43:16 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-08-18 17:43:16 - Emulator] please use -help for more information
Don't use spaces in sdk path.If your sdk contains path like program files/sdk-windsows then it will prompt error.Place in a directory where no spaces exists
When I run my hello world application, the android emulator fails to launch.Even when i am creating a new emulator it fails to launch giving me the following error.
[2011-08-09 17:03:10 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
[2011-08-09 17:03:10 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-08-09 17:03:10 - Emulator] please use -help for more information
First of all you need to check are you in correct folder?
$...local\Android\sdk\tools\emulator -list-avds
If so it will show you list of emulators that you have in your Android studio you are on right track
Last part for launching an emulator
local\Android\sdk\tools\emulator -avd Nexus_5X(name of your emulator you want to open)
The problem is, that you have specified your SDK in a file what has space, in its name For example: Android SDK You need to change it to something what hasn't got space in its name.
Hope it helps.
Or if you specified it in the Program Files use it:
Progra~1 instead of Program Files.
You are not specifying what AVD to launch. Please read the SDK docs in full, they will show you how to do this.
Tip: Launch the "android.exe" (I think, I use Linux where it's simply "android") app instead, create an AVD and launch it, all from the graphical interface.
The tricky part is finding name #foo
to find exact name of emulator run android command line emulator -list-avds aka ~/Library/Android/sdk/tools/emulator -list-avds
2.it will show you emulator names but emulator names that you pass to command line
bonus: you probably will get PANIC error in that case you need to add ANDROID_PATH read more here https://stackoverflow.com/a/49511666/6133329
On windows don't install the Android SDK to a path with spaces in it like C:\Program Files\AndroidSDK. Instead install it to C:\AndroidSDK\ or something like that.
Try this It worked for me...
emulator #avd_name [ {-option [value]} … ]
Type command emulator #youremulatorname
For more Check out this Link
For Windows
Check whether you have an emulator on your PC.
If it is there add the path below to the environment variable
C:\Users%username%\AppData\Local\Android\Sdk\emulator
and
remove C:\Users\deepank\AppData\Local\Android\Sdk\tools
: