在更新到Android Studio 2后,当我试图运行我的应用程序并选择一个模拟器时,我等待模拟器启动,它突然被杀死。我可以看到模拟器进程几分钟,但从来没有GUI。在Android studio中,我得到了错误

android studio Error while waiting for the device: The emulator process for AVD was killed

即使我在Android Studio之外运行模拟器也会发生这种情况。我试用了Android 6和基于Android 4.4的模拟器。 在Windows 7 x64 PC上运行。类似于另一个StackOverflow帖子被关闭。我尝试了各种ram、VM堆和分辨率设置。


当前回答

如果你的用户名不是ascii/有空格,那么这可能会有帮助,因为我尝试了这里所有的解决方案,不能解决这个问题:

注:我在这个视频中找到了这个解决方案,是一个叫“tatachka”的用户建议的,这是她的评论(她很友好地让我分享在这里)。

For example, I had this path c:\Users\Таня.android\avd\Nexus_One_API_24.avd My name in Windows is Таня, written in Cyrillic in windows encoding (cp1251). I changed the path to e:\Distribu\AVD.android\avd\Nexus_One_API_24.avd I moved files from disk C there and edited Nexus_One_API_24.ini changing the path in it and everything worked. How to change the folder path: My computer -> properties -> advanced system parameters -> environment variables - > lower 'New...' button: variable name: ANDROID_SDK_HOME variable value: e:\Distribu\AVD (in my case) After the reboot, a new folder(.android) appears in the folder e:\Distribu\AVD containing the 'avd' folder

编辑:为了澄清,这里的想法是您不希望路径具有非ascii字符。我把它移动到C:\programs_that_cant_read_hebrew(并执行了其他步骤),它工作得很好。

编辑:在注释后将“英文”更改为“ascii/空格”

其他回答

这对我很管用。您必须将android studio更新到最新版本,然后按照以下步骤更新sdk工具:

工具-> SDK管理器 选择Android SDK SDK工具标签 检查以更新可用选项。 按ok键 之后,这个过程将花费你几分钟,完成后,一切都会正常工作。

这些答案对我都没用。我只是用相同的设置创建了一个新的虚拟设备,并删除了旧的。新的工作很好。

我也有这样的问题。

fix:

1. 为Android VDM选择一个旧版本(系统镜像)-首先,我使用了28版本(在我的情况下是OREO),然后我切换到旧版本,到25(NOUGAT)。 2. 将“图形”更改为“软件”。

我的棘手的解决方案是尝试启动另一个模拟器,然后启动这个坏的模拟器。

在我的情况下(一个主256堆是坏的),我将开始一个主512堆,然后开始一个主256堆

进入:工具> Android > AVD管理器,按下“编辑”(铅笔) 图标旁边的AVD,改变“图形”为“软件”。 在我的Windows 10电脑和ubuntu 18.04上工作