Android/Eclipse PANIC: Could not open

2019-01-08 14:36发布

I'm brand new to Android development and Eclipse so I have just set it all up and I am attempting the Hello World tutorial. Sadly when I try and run the program I get the following error:

PANIC: Could not open: C:\Users\Nathan Smith.android/avd/Droid_4.0.3.ini

I have heard that you should avoid spaces in these paths. Is the space in the name where the problem is? If so how do I go about changing it?

If anyone could help me out with this that would be grand.

By the way I also noticed that my SDK path is C:\Users\Asus Laptop\android-sdks\ should I change this to the same user? This was not intentional, is there an easy way of me changing this to the right user?

8条回答
不美不萌又怎样
2楼-- · 2019-01-08 14:43

The simple solution is to create a symbolic link between your home directory and destination .android directory. The problem is that emulator looks for files on in your home directory.

mklink /D Link Target 

Probably you can copy .android dir or change a setting.

查看更多
迷人小祖宗
3楼-- · 2019-01-08 14:44

Home Folder Redirection To UNC / AVD Shows UNC Path

If you're unfortunate to have network UNC path mapped as your home directory using Windows Folder Redirection then AVD will fail to start.

You should also have a normal user directory under C:\Users, which contains non-mapped stuff. The trick is for Android SDK to use this instead. Similar to other answers, you need to set ANDROID_SDK_HOME user environment variable to your C:\ based home directory.

For example:

 ANDROID_SDK_HOME = C:\Users\MyUserName

Restart Eclipse.

In my hunt for a resolution, I found this answer which gives a great performance increase: https://stackoverflow.com/a/19338671/1554386

查看更多
不美不萌又怎样
4楼-- · 2019-01-08 14:48

I had the same problem, the issue seemed to be low disk space on the drive containing the emulator files (C).

查看更多
相关推荐>>
5楼-- · 2019-01-08 14:50

This has been asked a few times already, try this:

  1. Create a environment variable called: ANDROID_SDK_HOME and set it to C:\Users\Administrator
  2. Open Eclipse > Window > Preferences and click in Run/Debug and String Substitution
  3. Add a new variable called: user.home and set it to C:\Users\Administrator
  4. Create an AVD and run it.
查看更多
混吃等死
6楼-- · 2019-01-08 14:51

A simple solution,

Create your avd with normal steps. e.g. avd name is Nexus_One. You will see Nexus_One folder and Nexus_One.ini file at D:\Users\Nathan Smith\.android\avd

Copy Nexus_One.ini to C:\Users\Nathan Smith\.android\avd

Try running avd through AVD Manager. It will start the emulator.

Reason being it works, if you read ini file, you will find path variable as below,

path=D:\Users\Nathan Smith\.android\avd\Nexus_One.avd path.rel=avd\Nexus_One.avd

So, when you start emulator, it check the ini and tries to start emulator from path mentioned in path variable.

Hope this solves your problem.

查看更多
淡お忘
7楼-- · 2019-01-08 14:55

I had the same problem, but now its fixed.

Go to Windows in Eclipse, Windows->preference->run/debug->stringSubstitution-> add variable name as "user.home" Then the value will be your profile path Example: mine is C:\users\sriramk\.android

Now open the default .android path, copy the content, and paste that content into C:\users\sriramk\.android. Restart Eclipse and now the emulator will open.

查看更多
登录 后发表回答