[英]Expo / Android Simulator 'Error opening simulator'
I just installed Android Studio, created and ran a virtual device and have run expo, which successfully established the web server.我刚刚安装了 Android Studio,创建并运行了一个虚拟设备并运行了 expo,成功建立了 web 服务器。
However, when I click on 'Run on Android Device/emulator' in the browser, I simply get en error message which says 'Error opening simulator.但是,当我在浏览器中单击“在 Android 设备/模拟器上运行”时,我只是收到一条错误消息,上面写着“打开模拟器时出错。 Check metro logs for details'.
检查地铁日志以获取详细信息'。 There is no logged output on the screen or in the console.
屏幕或控制台中没有记录 output。
After a few seconds, I get the following message from Android Studio:几秒钟后,我从 Android Studio 收到以下消息:
If I try to launch Android in the console by pressing 'a', I get the following error:如果我尝试通过按“a”在控制台中启动 Android,我会收到以下错误:
EDIT: I found there were 2 adb processes running in the task manager.编辑:我发现有 2 个 adb 进程在任务管理器中运行。 I killed both and restarted expo, which now shows a different error:
我杀了两个并重新启动 expo,现在显示不同的错误:
Any idea on how I can resolve this please?关于如何解决这个问题的任何想法?
Thanks谢谢
So I found the solution myself.所以我自己找到了解决方案。
and bingo it worked.和宾果它奏效了。 If you have trouble, be sure you kill all adb processes before you start the process and try again.
如果遇到问题,请确保在启动进程之前杀死所有 adb 进程并重试。
I found a working solution on my system.我在我的系统上找到了一个可行的解决方案。
1- I deleted all of the emulators from android studio- 1- 我从 android studio 中删除了所有模拟器-
2- Then Tools --> SDK manager --> Android SDK and check the box in front of ' show package detail ' and Uncheck the box for Google APIs Intel x86... 2- 然后工具 --> SDK 管理器 --> Android SDK 并选中“显示 package 详细信息”前面的框并取消选中 Google APIs Intel x86 前面的框...
Then open your system's sdk path (Android SDK Location), (for example, my path is C:\Users\userName\AppData\Local\Android\Sdk ) open the folder and delete the folders inside the system image folder.然后打开你系统的 sdk 路径(Android SDK Location),(比如我的路径是C:\Users\userName\AppData\Local\Android\Sdk )打开文件夹,删除系统镜像文件夹里面的文件夹。
3- Now in android studio again, Tools --> SDK manager --> Android SDK, and check the box in front of ' show package detail '. 3- 现在再次进入 android 工作室,工具 --> SDK 经理 --> Android SDK,并选中“显示 package 详细信息”前面的框。 Look for Google APIs Intel x86...(check the box) under Android 12 (S), click apply to install again.
在 Android 12 (S) 下寻找 Google APIs Intel x86...(打勾),点击应用重新安装。
4- Tools--> Device manager --> create Device. 4- 工具 --> 设备管理器 --> 创建设备。 Set up a new emulator device
设置新的模拟器设备
connect it with Metro Bundler.将它与 Metro Bundler 连接起来。
Cheers, it worked for me without uninstalling the entire android studio.干杯,它对我有用,而无需卸载整个 android 工作室。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.