可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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.
回答1:
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.
回答2:
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.
回答3:
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
回答4:
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.
回答5:
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
回答6:
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.
回答7:
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.
回答8:
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.
回答9:
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.
回答10:
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
回答11:
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!
回答12:
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.
回答13:
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
回答14:
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.
回答15:
One way is to don't exit the emulator after running. You edit the program without closing emulator. Do it every time.
回答16:
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.
回答17:
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/