Trouble getting Android emulator to run in eclipse

2019-01-23 02:57发布

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.

17条回答
贼婆χ
2楼-- · 2019-01-23 03:01

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.

查看更多
叛逆
3楼-- · 2019-01-23 03:04

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

查看更多
爷、活的狠高调
4楼-- · 2019-01-23 03:04

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/
查看更多
可以哭但决不认输i
5楼-- · 2019-01-23 03:06

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.

查看更多
你好瞎i
6楼-- · 2019-01-23 03:11

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

查看更多
够拽才男人
7楼-- · 2019-01-23 03:12

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!

查看更多
登录 后发表回答