在更新到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堆和分辨率设置。


当前回答

我尝试了张贴在这里的一切,但没有工作。我通过更新我的MacOS解决了这个问题。

我用的是10.14 Mojace,我把它更新到了最新版本11.2.1 Big Sur。

当我试图从命令行启动模拟器时,我收到了以下错误。经过一番研究,我发现在Catalina之后,苹果改变了一些系统库的位置。我不确定这是由它引起的,但升级MacOS为我解决了这个问题。

其他回答

去SDK管理器,看看模拟器和构建工具上是否有任何需要更新的更新。

Android编程的大家好… 我有同样的问题安卓模拟器被杀,但摆脱了这个问题成功和安卓模拟器运行正常通过做以下事情…

Firstly, I updated my SDKs from android studio SDK manager but issue does not resolved. Secondly, I have faced problems regarding my computer C Drive space where path of SDK folder is located. My C Drive space is running very low and does not allow me to update SDK from android studio showing me error and my Android emulator gets killed then I moved my SDK folder from C Drive to another drive D which have huge space available, then Changed my sdk folder path form android studio and restart it and matter resolved successfully. Cheers... Best Regards

如果你的用户名不是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/空格”

以我为例,在我尝试了较低版本的Pixel和Android后,问题得到了解决。

我试着用一个新的系统映像编辑AVD,瞧!它工作! 我有Nexus 5X API 24