简体   繁体   English

为AVD启动模拟器avd PANIC:无法打开:avd - Ubuntu 13.10

[英]Starting emulator for AVD avd PANIC: Could not open: avd - Ubuntu 13.10

I had been using the android sdk for quite some time in my Ubuntu. 我在Ubuntu中使用android sdk已经有一段时间了。 Recently, I upgraded it to Ubuntu 13.10. 最近,我将其升级到Ubuntu 13.10。 From then on, whenever I try to launch an android virtual device, I get this error : 从那时起,每当我尝试启动Android虚拟设备时,我都会收到此错误:

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? 有什么建议吗?

It might be that the AVD was created for a different user, as this blog post suggests. 可能是AVD是为不同的用户创建的,正如这篇博客文章所暗示的那样。 Check your /home/ your-user-name /.android/avd content as well as /root/.android/avd. 检查/ home / your-user-name /.android/avd内容以及/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. 在我的例子中,我创建的AVD以root身份登陆,而IDE试图在我的用户avd目录中找到它们。 Copying everything to the other AVD directory did the trick. 将所有内容复制到另一个AVD目录就可以了。

Good luck! 祝好运!

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". 首先,因为我使用命令“sudo ./eclipse”启动了eclipse,所以“.android / avd”是在“/ root”下创建的,而不是在“/ usr / myname”下创建的。 This, I corrected by copying ".android/avd" from "root" to "/usr/myname". 这个,我通过将“.android / avd”从“root”复制到“/ 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 chmod a + r + w + x -R myname(这是为了确保文件夹myname和所有子文件夹获得最大访问权限)。 cd /usr/local chmod a+r+w+x -R adt-bundle-linux-x86_64-20131030 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). 最后,在再次启动eclipse时,只需键入./eclipse(不带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. 根据您的使用情况,您可能需要小心提供对包含用户数据的两个主目录下的所有文件夹的读/写/执行访问权限。

even i was facing the same issue , got resolved as of now 即使我面临同样的问题,现在也得到了解决

If you are using Eclipse IDE then after setting the Environment variable : 如果您正在使用Eclipse IDE,那么在设置Environment变量之后:

name : ANDROID_SDK_HOME 名称:ANDROID_SDK_HOME

value : C:\\Users\\user\u003c/i> 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. 这应该是你的.android驻留在我的情况下的路径:C:\\ Users \\ user.android ..但是不要在路径中添加.android。

Go to eclipse > windows > preferences > run/debug > string substitution > new : 转到eclipse> windows> preferences> run / debug> string substitution> new:

name : user.home name:user.home

value : C:\\Users\\user\u003c/i> value:C:\\ Users \\ user

the same path as in environment variable. 与环境变量中的路径相同。

Later close your eclipse then 然后关闭你的日食

run again as admin 以管理员身份再次运行

.

The AVD location that Android IDE is searching in may be wrong. Android IDE正在搜索的AVD位置可能有误。

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: 最简单的检查方法是使用AVD管理器创建一个新的AVD,并检查该位置是否与'Ace2'相同,并且可以运行:

emulator -avd <avd-name>

If not, shift 'Ace 2' over to the correct location and it should work fine. 如果没有,将'Ace 2'移到正确的位置,它应该可以正常工作。

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 . 我检查了我的HOME目录,发现有一个隐藏文件夹.android ,它的所有者是root I think it happened because I launched eclipse as superuser several times. 我认为这是因为我多次以超级用户身份启动eclipse。 Then I simply changed the owner and the group of that folder .android ( chown command) and it helped. 然后我只是更改了该文件夹.androidchown命令)的所有者和组,并且它有所帮助。 I created new AVD and managed to start it. 我创建了新的AVD并设法启动它。

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! 我使用Linux:我失败了​​,因为我第一次使用root启动了模拟器,之后我开始使用sudo或普通用户! Also I tried to start an emulator who didnt exists. 此外,我试图启动一个不存在的模拟器。

So try to start as root! 所以试着从根本上开始吧!

I started using Eclipse, and going through the error: PANIC:Could not open AVD. 我开始使用Eclipse,并经历错误:PANIC:无法打开AVD。 When I created a new AVD in AVD Manager, I saw the path shown there was : C:\\Windows\\System32\\config\\systemprofile.android\\avd 当我在AVD Manager中创建一个新的AVD时,我看到显示的路径是: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. 从上面的帖子中参考,我尝试将刚刚提到的路径中的avd文件夹复制到:C:\\ Users \\ User_name.android文件夹,它工作正常。

I hope this may help you. 我希望这可以帮到你。 Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM