This question already exists:
Closed 11 years ago.
Possible Duplicate:
android emulator does not work
I cannot make my android emulator work, it gives me these error message.
[2011-08-20 15:17:03 - Emulator] invalid command-line parameter: Files.
[2011-08-20 15:17:03 - Emulator] Hint: use '#foo' to launch a virtual device named 'foo'.
[2011-08-20 15:17:03 - Emulator] please use -help for more information
what can I do to make it work?
Sometimes, because there is spaces in the path to your AVD, you need to run it using a batch file like this;
c:
cd c:\Program Files\Android\android-sdk\tools
emulator -cpu-delay 0 -no-boot-anim -cache ./cache #my_avd
If your serious about deving for android however, I'd really recommend using a phone to debug, its like 4/5 times faster then the emulator....
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).
I'm working on the Hello World project at http://developer.android.com/resources/tutorials/hello-world.html
The trouble comes when I run the application. The sequence of messages I get is something like:
[2012-04-30 15:13:19 - HelloAndroid] ------------------------------
[2012-04-30 15:13:19 - HelloAndroid] Android Launch!
[2012-04-30 15:13:19 - HelloAndroid] adb is running normally.
[2012-04-30 15:13:19 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2012-04-30 15:13:19 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
[2012-04-30 15:13:19 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd'
[2012-04-30 15:13:25 - Emulator] NAND: could not write file /tmp/android-jhsu/emulator-7iTL7m, File exists
What exactly is stopping the process from executing properly? What do I need to do to fix this?
UPDATE 1:
OK, I tried your suggestions about clearing the avd.
I went into my android_sdk_linux directory and entered "tools/android list avd". The output was:
Available Android Virtual Devices:
Name: my_avd
Path: /home/jhsu/.android/avd/my_avd.avd
Target: Android 4.0.3 (API level 15)
ABI: armeabi-v7a
Skin: WVGA800
So I entered "tools/emulator -avd my_avd -wipe-data". The output was:
NAND: could not write file /tmp/android-jhsu/emulator-5FHEn7, File exists
But I looked in the /tmp/android-jhsu directory and saw no file at all, not even a hidden file.
Where do I go from here?
I was able to fix it exporting ANDROID_TMP
export ANDROID_TMP=/home/myuser
For me at least, I'd let my disk run out of space without realizing it.
It was just coincidence that this was the first item that failed.
It's a real disturbing situation when error can't completely describe problem in detail!
finally I figured out all this kind of error messages ("File Exists" and "There is no space") are due to small amount of mounted space on /tmp folder.
in Linux try mount and you'll see specified parameters of tmpfs and /tmp
changing $ANDROID_TMP value is not a proper solution and even doesn't work at all.
try editing fstab
sudo gedit /etc/fstab
and increase /tmp size to a larger value that makes sense to you (like:1500M)
then reboot system
PS: It's not IDE-dependent (Eclipse or Android-Studio) but something that deal with AVD Emulator
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'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
: