问题
I had been using the android sdk for quite some time in my Ubuntu. Recently, I upgraded it to Ubuntu 13.10. From then on, whenever I try to launch an android virtual device, I get this error :
Starting emulator for AVD 'Ace2'
PANIC: Could not open: Ace2
I tried changing the permissions for the files and folders but still no improvement. Any suggestion?
回答1:
It might be that the AVD was created for a different user, as this blog post suggests. Check your /home/your-user-name/.android/avd content as well as /root/.android/avd. In my case, the AVDs I created landed up in root, whereas the IDE tried to find them in my user avd directory. Copying everything to the other AVD directory did the trick.
Good luck!
回答2:
I had the same issue which was fixed by following the advise on this thread (which was the main issue) but was not sufficient. I had to do more in my case. Please see if the below helps.
First, since I had started eclipse using the command "sudo ./eclipse" the ".android/avd" was created under "/root" rather than under "/usr/myname". This, I corrected by copying ".android/avd" from "root" to "/usr/myname".
However, that still did not fix things. I then had to change permissions in two places as follows cd /usr chmod a+r+w+x -R myname (this to ensure that the folder myname and all subfolders get max access rights). cd /usr/local chmod a+r+w+x -R adt-bundle-linux-x86_64-20131030
Finally, while starting eclipse again, just type ./eclipse (without sudo).
Bingo. That did it. Note: You will see that I have provided max permissions to all subfolders, that is because mine is a learning setup. Depending on your usage, you may need to be careful providing read/write/execute access to all folders under two main directories that contain user data.
回答3:
even i was facing the same issue , got resolved as of now
If you are using Eclipse IDE then after setting the Environment variable :
name : ANDROID_SDK_HOME
value : C:\Users\user
this should be the path where your .android is residing in my case : C:\Users\user.android.. but don't add .android in path.
Go to eclipse > windows > preferences > run/debug > string substitution > new :
name : user.home
value : C:\Users\user
the same path as in environment variable.
Later close your eclipse then
run again as admin
.
回答4:
The AVD location that Android IDE is searching in may be wrong.
The easiest way to check is to create a new AVD with AVD manager and check if the location is the same as 'Ace2' and that it can be run with:
emulator -avd <avd-name>
If not, shift 'Ace 2' over to the correct location and it should work fine.
回答5:
The way how I solved this problem. I examined my HOME directory and found that there's a hidden folder .android and it's owner was root. I think it happened because I launched eclipse as superuser several times. Then I simply changed the owner and the group of that folder .android (chown command) and it helped. I created new AVD and managed to start it.
回答6:
I use Linux: I got this failure, because I started the first time the emulator with root and afterwards I started with sudo or normal user! Also I tried to start an emulator who didnt exists.
So try to start as root!
回答7:
I started using Eclipse, and going through the error: PANIC:Could not open AVD. When I created a new AVD in AVD Manager, I saw the path shown there was : C:\Windows\System32\config\systemprofile.android\avd
Taking reference from the above posts, I tried copying avd folder from just mentioned path to : C:\Users\User_name.android folder and it worked.
I hope this may help you. Thanks.
来源:https://stackoverflow.com/questions/20866033/starting-emulator-for-avd-avd-panic-could-not-open-avd-ubuntu-13-10