I'm trying to run the SDK Samples on the Emulator in Eclipse 3.5.
Most of the time the AVD Manager hangs when I try to create a new AVD.
When I manage to create an AVD and try to start the emulator I get this:
emulator: ERROR: no search paths found in this AVD's configuration
weird, the AVD's config.ini file is malformed. Try re-creating it.
I'm running the latest version of the SDK on Win7 32 bit. Any ideas?
Update:
I think I found the source of the problem. I'm running a Hebrew version of WIN 7. My user name is in Hebrew. Apparently this causes a problem for Eclipse. Once I started to suspect that was the problem, I created a new user on the system called DEV and tried to run the emulator under that user. Went like butter.
You can set the environment variable ANDROID_SDK_HOME. For example:
ANDROID_SDK_HOME=D:\Development\android-sdk\
It helped me. Add this variable to <eclipseFolder>\configuration\.settings\org.eclipse.ui.ide.prefs:
ANDROID_SDK_HOME=D\:\\Development\\android-sdk\\
Stop the process adb.exe and (re)start Eclipse.
The problem here is that my c:\users... path has foreign characters in it "Michael Schøler" - the "ø" being the problem.
This is an ecclipse and/or Android SDK problem.
move c:\Users\YourName\.android\avd\YourAVDName.avd manually to c:\Android\YourAVDName.avd then open c:\Users\YourName\.android\avd\YourAVDName.ini and change path from
path=c:\Users\YourName\.android\avd\YourAVDName.avd to path=c:\Android\YourAVDName.avd
Another rather simple solution to this problem (non-english characters in the AVD's path), is to use the "shortname" of the directories. In my case:
My windows user is "András", so my homedir is C:\Users\András
If you open up a cmd, cd to C:\Users, and issue a "dir /x" command, you will see the "shortnames" of the directories, in my case it is "ANDRS~1".
So you just change the path in the AVD's config file from C:\Users\András\blabla to C:\Users\ANDRS~1\blabla, and voila, it works.
If you have special character in your username do this:
~/.android/avd on OS X and Linux, C:\Documents and Settings\user\.android\ on Windows XP, and C:\Users\user\.android\avd on Windows Vista, 7.
There name.ini and name.avd folder
- copy the folder for example: C:\
- modifiy the path in the .ini to path=C:\name.avd
I had a similar problem because of non-latin letters in my username.
When opening the ini-file in a text editor I found the non-latin characters was wrong. So I just changed the path from
path=c:\Users\YourNa¤%"%¤%%¤me.android\avd\YourAVDName.avd
to
path=c:\Users\YourName.android\avd\YourAVDName.avd
and it worked.
To make sure everything is installed correctly, I recommend you reinstall all the components. To be sure everything goes correctly follow my step by step instructions on my blog.
http://androidcodemonkey.blogspot.com/2010/01/how-to-setup-android-development_23.html
If you follow all the steps you should be good to go!
Good luck.
I had the same error. What I found was that I was missing
ARM EABI v7a System Image.
I fixed it by opening the Android SDK Manager (The tool bar button looks like a little white arrow in a gray box with green android head)
I checked the missing system image and clicked the install button.
See this topic.
I also had the same problem since my username was in Cyrilic letters Димитров.
I change it to a latin alphabet and then it's OK.
You have to use Android tool from sdk\tools folder to move your AVD device to some Folder with no foreign characters in the path.
Just type android move avd -n "nameofdevice" -p "newpath"
For example: android move avd -n HTDDESIRE -p C:\HTCDESIRE
I agree with Zian, something is seriously wrong here and you should consider reinstalling. Also make sure of the following:
1) Make sure your avd folder looks sane. This can be found in the .android directory in your home directory. Look in ~\.android\avd\<name-of-avd>.avd\ and you should see config.ini and userdata.img files, plus an sd image if you created one. Make sure your config.ini looks something like this:
hw.sdCard=yes
hw.dPad=yes
hw.accelerometer=yes
hw.lcd.density=160
skin.name=HVGA
skin.path=platforms/android-1.6/skins/HVGA
hw.trackBall=no
hw.ramSize=256
image.sysdir.1=platforms/android-1.6/images/
Or, if you don't have any custom settings, then it will just consist of this one line:
hw.lcd.density=160
2) Make sure you have the latest version of the ADT Eclipse plugin (v0.95).
3) Also, you really truly shouldn't have any permissions problems within your home directory, but hey, it's Windows -- you never know. So you may want to manually set the permissions to the avd/ folder to read/write/execute, just to be sure.
4) Other than that, reinstall with extreme prejudice!
Try to download again the SDK, unzip it and reinstall through Eclipse.
Be sure to have the last version and have configured all the paths in Eclipse preferences correctly.
If you have installed the Android SDK to a different drive ie not C: then you might need to set the ANDROID_HOME environment variable to the location of the SDK installation
Another consideration I may have overlooked in others answers - I see you mentioned Eclipse 3.5 - consider using 3.5.2 (the current latest version)
May not matter, may have just been omitted by you, either way using the most up to date stuff never hurts.
One way is to don't exit the emulator after running. You edit the program without closing emulator. Do it every time.
This solved it for me on IOS: I looked in the actual .ini file for the device (Nexus-7-inch-tablet.ini) which looked like:
avd.ini.encoding=ISO-8859-1
target=android-17
path=/Users/stevensanborn/.android/avd/Nexus-7-inch-tablet.avd
path.rel=avd/Nexus-7-inch-tablet.avd
and removed and extra return space in the file. Resaved it and worked. Ridiculous.
The solution (that worked for me) was to add the following missing entries in my avd's config.ini:
image.sysdir.2=system-images/android-14/armeabi-v7a/
image.sysdir.1=add-ons/addon-google_apis-google-14/images/armeabi-v7a/
Related
Recently I have installed the last version of Android Studio (Android Studio 2.1), keeping the old 1.2 version previously installed. Now i have Android Studio 2.1 and Android Studio 1.2. In Android Studio 1.2 when I click on SDK Manager it works properly, but in Andorid Studio 2.1 this problem appears:
how can I fix keeping the two versions of Android studio? Thanks
As the warning message states, the SDK location should not contain whitespace.
Your SDK is at C:\Users\Giacomo B\AppData\Local\Android\sdk. There is a whitespace character in Giacomo B.
The easiest solution is to move the SDK somewhere else, where there is no space or other whitespace character in the path, such as C:\Android\sdk. You can point both Android Studio installations to the new location.
There is another way:
Open up CMD (as Administrator)
Type: mklink /J C:\Program-Files "C:\Program Files" (Or in my case mklink /J C:\Program-Files-(x86) "C:\Program Files (x86)")
Hit enter
Magic happens! (Check your C drive)
Now you can point to C:\Program-Files (C:\Program-Files-(x86)).
just change the path:
"c:\program files\android\sdk" to "c:\progra~1\android\sdk"
or
"c:\program files (x86)\android\sdk" to "c:\progra~2\android\sdk"
note that the paths should not contain spaces.
It is possible to make a symbolic link from e.g. C:\Android\sdk to the actual location of the sdk (which contains whitespaces), and refer to this symbolic link from within Android Studio as the location of the SDK. I have, however, not tried whether NDK will work with such a setup, even though Android Studio stops giving this warning about whitespaces.
As long as you aren't using the NDK you can just ignore that warning.
By the way: This warning has nothing to do with parallel installations.
Simply....If you are not using NDK, there is no problem at all. On the other this is just warning not an error. With warning you can go ahead but not errors. Any it's better to adjust the whitespaces.
E.g if your SDK is at C:\program file\Android studio. There is a whitespaces "program file".
There are 2 simple methods:
1. Remove the whitespaces
2. Install at another location which don't have whitespaces.
I have the same error, make some change in the path C:\Users\Juan Jose\App---- to
C:\Users\JUAN~1\App.
CMD Command (Windows) go to root c:\Users
Type de command DIR /X
Here show a Short name of Juan Jose
Reemplace the name Juan Jose with the Short Name give it.
Copy your SDK folder and paste it in another folder without spaces (for example: "D: / Android / Sdk"), then open the SDK Manager, and change the Android SDK Location to the location of your new SDK folder
Just change
C:\Users\Giacomo B\AppData\Local\Android\sdk
to
C:\Users\Giacomo_B\AppData\Local\Android\sdk
I just wanted to add a solution for Mac users since this is the top article that comes up for searches related to this issue. If you have macOS 10.13 or later you can make use of APFS Space Sharing.
Open Disk Utility
Click Partition
Click Add Volume -- no need to Partition as we are adding an APFS volume which shares space within the current partition/container)
Give the volume a name (without spaces)
Click Add
You can now mount this drive like any other via Terminal: cd /Volumes/<your_volume_name>
Create an empty folder in the new volume -- I called mine sdk
You can now select the volume and directory while installing Android Studio
your sdk file path does not have whitespace like this./abc aaa/sdk it like ./abc_aaa/sdk this.
you know that this is does not do anything with your java and xml. It only affect the ndk which is for native apps or to use c++/c. so if you are just using java and xml or even kotlin there is no side effect with that thing
Just remove white space of all folders present in the given path for example Program Files
You can remove it by following steps->
Open elevated cmd,
In the command prompt execute:
mklink /J C:\Program-Files "C:\Program Files"
This will remove space and replace it with "-".
Better do this with both sdk and jdk path.
This works :)
The error message is:
PANIC: Could not open AVD config file: C:\Users\Darth\.android\avd\Nexus_5_API_21_x86.avd\config.ini
I've looked in that directory and there is no config.ini file. Only a userdata.img file.
When looking in the AVD manager the actions column says "Failed to load". If I right click it and click details it shows an error of:
Error: Failed to parse properties from C:\Users\Username\.android\avd\Nexus_5_API_21_x87.avd\config.ini
Fixes attempted that didn't work:
1 - Try choosing a different device definition. (config.ini file still missing when choosing multiple other devices)
2 - sharing the .android directory with my whole homegroup (selecting a device still doesn't generate a config.ini file, same error persists)
FIX: Thanks for all the replies. The fix that worked was changing the Memory of the AVD to 512!
I also had this same error, but the cause wasn't mis-matched x64 vs x86. Turns out my emulator failed to load because the skin wasn't defined. The way that I fixed it was:
Remove any previous wear emulators that failed
Pick the Model (Round/Square) and Android version(Lollipop, for instance)
On the final screen, click "Show Advanced Settings"
Scroll all the way to the bottom and set the "Custom skin definition" to "AndroidWearSquare" or "AndroidWearRound", which should be at the bottom of the skins list
Then after you're finished it should all just work!
Just put the Android SDK in the same Drive where you have installed the Android Studio 1.0. There is a problem if these drive letters are different. This will definitely work for you.I have solved this last week.
Try to use an AVD Manager from C:\User\<%USERNAME%>\AppData\Local\Android\Sdk\
https://code.google.com/p/android/issues/detail?id=78577#c25
For windows:
1) in the environment variables add a new "system variables"
ANDROID_SDK_HOME=D:\Program Files\android-sdk-windows (select your home directory of android sdk )
2) modify system variables Path, add "%Android_SDK_HOME%\tools;"
I have created many emulators and never touch .android\avd\Nexus_5_API_21_x87.avd\config.ini
you just create an Emulator, try to avoid "warp user Data", chose the appropriate Device and target API, set the SD memory to amount you want, and do the same with external RAM,and there is no reason to not work.
guesses: may the \Nexus_5_API_21_x87.avd\config.ini is read only! or you don't have permission to access .android/ (share this folder to all users,and give them full acsess.
I hope this will help
As I mentioned above I was facing the same issue.
For me it looks like the bug of the build and definitely not the issue rights, while another file was perfectly created (userdata.img) as well as the whole folder for the avd.
Solution #1: without changing anything in installation, I just found config.ini file in the internet. For example here is the config.ini for Nexus_S_API_21
So then I created Nexus_S AVD and put the config file in the folder. Then it starts working.
The issue with this method:
limited devices
config updates manually through config file
I still had some issues, e.g. instead of displaying the project I was displayed with the home page of Android, and there was no my app
Solution #2: Then I totally removed the Android Studio and cleaned all the stuff and downloaded 0.8.14 from scratch, during installation I updated it once to v.0.9.9. and then didn't update further.
In this version - everything worked just fine without any manipulation. AVD created from the first time and when launched - the project screen is displayed opened with Hello World.
I had the same issue and I was able to fix it with the below solution.
Root Cause: My system is 32-bit and the config.ini file was present in
C:\Users\Saajan Pruthi\.android\avd\Nexus_5_API_21_x86.avd
instead of
C:\Users\Saajan Pruthi\.android\avd\Nexus_5_API_21.avd
Note the x86... I simply copied the config file into the later folder and it worked.
I had the same issue inside Linux. The problem was that made install with root and executed the Android Studio from mi normal user, so in the momment that I install Android Studio every files android for emule stay here:
/root/.android/avd/Nexus_5_API_21_x86.avd
/root/.android/avd/Nexus_5_API_21_x86.ini
So you need do copy the files at your user, then:
sudo cp -Rf /root/.android /home/YOUR_USER
I hope that be help. Regards.
I did the following and it worked:
moved the sdk folder from C:\Users\User\AppData\Local\Android\sdk to the Android Studio program folder under C:\Program Files\Android\Android Studio\sdk
Restarted Android studio and reconfigured it to point to the new sdk folder
Recreated the emulator and started it
I had this problem as well. I just removed the AVD and added it back again - emulator is running fine now.
I had the same problem, and it turned out that my hard drive was full. For anyone still looking for a solution, definitely make sure you still have space.
I want to write an Android app and I've started this morning by loading JDK, eclipse, SDK etc, all from the adt-bundle-windows-x86_64-20130219 from http://developer.android.com.
The issue for me right now:
[2013-02-27 13:36:26 - Test2] Android Launch!
[2013-02-27 13:36:26 - Test2] adb is running normally.
[2013-02-27 13:36:26 - Test2] Performing com.example.test2.MainActivity activity launch
[2013-02-27 13:37:27 - Test2] Launching a new emulator with Virtual Device 'droidX2'
[2013-02-27 13:37:27 - Emulator] PANIC: Could not open: droidX2
I've been sifting though posts on the web all morning about AVD and I haven't seen one that didn't involve the path being messed up and the .ini not found. I don't think I've got a path issue. AVD is looking for files on D:\USERS\XXX\.android\avd and that's where the files are. So don't understand why the emulator can't open.
I've done the most basic things like remove and re-install everything, read the notes at orace etc. Basically I'm stuck. Any suggestions here?
adt-bundle-windows-x86_64-20130219 was what I loaded on Windows 7 (32bit).
I'd settle for testing on the mobile that's connected to the PC but I can't get that to work either!
Any direction appreciated.
This has been asked a few times already, try these:
Create a environment variable called: ANDROID_SDK_HOME and set it to
C:\Users\Administrator Open Eclipse > Window > Preferences and click
in Run/Debug and String Substitution Add a new variable called:
user.home and set it to C:\Users\Administrator Create an AVD and run
it.
Original answer by Colin
an android project member says here:
As a work-around, you can define the environment variable
ANDROID_SDK_HOME to point to the directory containing your .android
directory. The emulator and SDK Manager will pick it up properly.
verify that The location in which the avd was searched from is different from where it is actually created. Take a look at the screenshot below for more information.
ANOTHER OPTION: Symlinking...
In a command prompt (with admin privileges), change directory ("cd") to "C:\Users\YourUserName.android" and then use the following command to create a symlink to the avd directory (notice the direction of the slashes):
mklink /D avd D:\_MyLibrariesDir\.android\avd
Where "_MyLibrariesDir" is the directory that your libraries (photos, documents, etc) folders are located.
And you're done!
Explanation: This has the same effect as the ANDROID_SDK_HOME option except that you can now browse to [C:\Users\YourUserName\.android\avd\*] and [D:_MyLibrariesDir\.android\avd\*] and both will take you to the same spot.
This differs from a shortcut in that shortcuts do not act as directories, so if you just had a shortcut to the "avd" folder, you could not go to "C:\Users\YourUserName\.android\avd*" as it would produce a file not found error and if you tried to click on an avd shortcut file it would take you to [D:_MyLibrariesDir\.android\avd\*] instead of keeping you on the C drive. Symlinks act a bridge between locations in a way that is transparent to user and software. Quite handy :)
I fixed the AVD Panic issue by running Eclipse as an administrator.
On Ubuntu check the current user if you run eclipse as root (sudo) eclipse could NOT find the /root/.android set the user home
user.home /home/<user>/
and copy the AVD files into the new directory than changes the privileges
cd /home/<user>/
chgrp <user> -R .android
chgrp <user> -R .android
Simply if nothing works for you, just copy the folder avd which you could find in your .android folder to C:\Users\<user name>\.android.
Pls check once in Ur ".android" folder, another/duplicate ".android" folder might have been created. If "YES" is Ur answer then do this thing because in my case that thing was happened.
Simply I just kept only the latest ".android" folder in this directory "C:\Users\USER NAME\" (removed the duplicated one) and then emulator started working for me.
Cheers
try to add new windows admin user with English language only
it worked for me
the user name should be in English letters
Found a simple way to make it work - worth trying:
1. If you do not have it yet - create a new AVD with the problematic name (in this case droidX2) if you see an overwrite warning - overwrite it.
2. Delete the new AVD you just created in step 1.
3. If you have another AVD it's OK, if not - create one.
4. Retry running the Eclipse project as an Android application - now it should run
Setting the ANDROID_SDK_HOME environment variable alone works fine for Win7 and earlier but did not help me on Win8.
For poor tortured souls using the piece of crap which is Windows 8, go to wherever you've installed the Android SDK (e.g. C:\SDK\Android or C:\Users\JoeCitizen\AppData\Local\Android\android-sdk) and make sure both AVD Manager.exe and SDK Manager.exe are set to run as Administrator for all users. Once I did that it worked fine.
Yet another deceptive problem-which-shouldn't-be-a-problem caused by the complete fail which is permission management circa Windows 8.
Using Windows 7, Eclipse, Android SDK tools 23.0.4
First time I followed the exact instruction on http://developer.android.com/training/index.html
I got the error "PANIC: could not open.." whenever 'Start' emulator.
Solution: System property popup/Enviroment Variables/ System variables, Added new entry
name="ANDROID_SDK_HOME", value = "D:\DATA\Users\ThisUser\"
Then it starts work!
"D:\DATA\Users\ThisUser\" is parent folder where ".android/avd" folder exists.
avd folder path here is "D:\DATA\Users\ThisUser.android\avd"
Note that you must put "D:\DATA\Users\ThisUser\", not "D:\DATA\Users\ThisUser**.android**"
I've been trying to fix this for the last 48 hours, and it is driving me insane.
My SDK Manager.exe flashes a cmd screen and closes in less than a second.
After much searching, I finally managed to get my SDK Manager to open after adjusting android.bat, and running it as administrator.
But, SDK Manager.exe was not able to find android.bat so I copied it into the android-sdk folder.
SDK Manager.exe is now able to find android.bat, but it is still briefly flashing cmd and then closing.
My PATH variable has my jdk java.exe directory as the first entry, and I have restarted and reinstalled several times.
What is causing this? Why am I able to open the manager from android.bat, but not from the executable?
I am trying to configure Eclipse to use the SDK Manager, but obviously I cannot because the executable refuses to open.
Eclipse is also telling me that adb.exe is missing, and upon checking platforms I have confirmed this. I assume adb.exe will be installed from the SDK Manager?
Edit: After thinking about it, I think the issue may be with the permissions of android.bat. It must be run as administrator in order to work, otherwise if opened regularly it will say "Access is denied".
Is it possible to change this? Looking in the properties of android.bat, I have adjusted my account to have full control. This has not affected the issue, though.
I've experienced this on some machines, but not others. It's a strange problem and I believe it has to do with a path problem in one of the android files (android.bat?).
Why this happens on some installs and not others I have yet to figure out. I've read everything I could find both here and on the interweb, tried many different solutions, including installing another version of JDK 6 and 7, modifying the path variable, adding a JAVA_HOME variable, etc. and none worked.
This worked for me in Windows 7...
1) Add a copy of the "SDK Manager.exe" file INSIDE the SDK folder (so it's next to the tools, platforms, et. al folders) and then run it. You will still see the command window "flash" for a second and then disappear, but be patient and the SDK manager WILL show up.
2) Create a shortcut to this "inside" copy of the SDK Manager.exe and move it where ever you want; it now knows where to go to find the files and works every time. I have a copy on my desktop, but it doesn't matter where you put it.
Note: There's still a problem somewhere, and it may have to do with Google, but it seems to happen to some people regardless of what/when they do an install, while others have no issues at all.
This may not be the answer we need to get Google to fix it, but it works without uninstalling/reinstalling java or the SDK, modifying/adding variables, modifying android.bat, changing your path, running as admin, etc., and the best part is it's easy. It's too bad many of us have wasted hours of time on trying to fix it.
Good Luck!
Note: I added the comment below about x64 machines. It's strange, but when we tried it on one x64 (OS/ADT) machine and it didn't work. I just tried a fresh install of Java 7 x64, and ADT x64 on a machine where it was working with a 32bit install (meaning I now have both 32bit and 64bit installs of Java and ADT on the same machine) and again, it works fine. A brief flash, it goes away, and then the SDK manager opens as expected. The mystery continues. :)
I had the same problem when I updated my android SDK tools to 23.0.2. Spent a lot of time (around 6 hours) messing around trying to find a fix... and I found it, but still not sure how it all works.
It has to do with android.bat file in the tools folder of your android SDK directory, in the lines:
set java_exe=
call lib\find_java.bat
I modified the lines into the following values:
set java_exe=pathwhereyoufindjavaexe
REM call lib\find_java.bat
Basically, two things are done:
Set your java_exe variable to your Java.exe path
Delete, or comment the line: "call lib\find_java.bat"
I commented second line so it DOESN'T re-set my java_exe variable through find_java.bat, and manually set my java_exe variable to where my java.exe file is. If you don't know where (or forgot where) your java.exe is, try using windows search for it.
My path for java.exe is different from the one found using find_java.bat.
My Actual path:
U:\PortableApps\CommonFiles\Java\bin\Java.exe
The path find_java.bat sets it to:
C:\Windows\systems32\java.exe
NOTE:
I figured what path "call lib\find_java.bat" sets the java_exe variable through adding the following command below the line itself:
echo %java_exe%
pause
I'm not sure if this is some sort of permission or access error, or this solution worked only for me since my java JDK is on USB device or such. Well, if anyone else bump into this problem, give my solution a try and see if it works for you guys as well.
I had the same issue!
I had installed the ADT bundle 64-bit, so I downloaded Java 64-bit.
I messed around with paths and things, but the thing that fixed it in the end was installed Java 32-bit.
The easy fix is to install both versions. You can download them manually here.
Good luck!
I don't know if it will solve your problem but make sure you have installed jre and jdk and android sdk for the same bit system (I mean that all three are for 32 or 64 bit systems).
I once had an android problem based on this!
If you use them for one system try to reinstall them.
I had a similar problem and it worked after changing all versions to 64 bit.
Hope I could help you.
When you 'Run as administrator' the current directory gets changed because you are impersonating another user. To prove this put the following line at the top of your bat file:
echo.CD=%CD% & pause
Then execute your bat file as a normal user and observe result.
Now execute bat file via 'Run as administrator' and note that CD has been changed to C:\Windows\system32 (typical).
The fix is simple. Put the following line in your bat file to restore the current directory:
pushd %~dp0
It needs to be before you reference any files/folders. I typically put that line near the top of all bat files that may be 'Run as administrator'. It does not hurt anything if used for older (XP) OS's.
I had same problem with Windows 8.1 64-bit and JDK8. I uninstalled JDK8x64 and installed JDK8i586 and now it works like a charm.
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.