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条回答
Summer. ? 凉城
2楼-- · 2019-01-23 03:14

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.

查看更多
劫难
3楼-- · 2019-01-23 03:14

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

查看更多
来,给爷笑一个
4楼-- · 2019-01-23 03:16

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.

查看更多
相关推荐>>
5楼-- · 2019-01-23 03:17

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.

查看更多
手持菜刀,她持情操
6楼-- · 2019-01-23 03:21

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.

查看更多
做自己的国王
7楼-- · 2019-01-23 03:21

One way is to don't exit the emulator after running. You edit the program without closing emulator. Do it every time.

查看更多
登录 后发表回答