'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.
However, when I click on 'Run on Android Device/emulator' in the browser, I simply get en error message which says 'Error opening simulator. Check metro logs for details'. There is no logged output on the screen or in the console.
After a few seconds, I get the following message from Android Studio:
If I try to launch Android in the console by pressing 'a', I get the following error:
EDIT: I found there were 2 adb processes running in the task manager. I killed both and restarted expo, which now shows a different error:
Any idea on how I can resolve this please?
Thanks
Solution 1:[1]
So I found the solution myself.
- I completely removed Android Studio (see here for windows: How to completely uninstall Android Studio from windows(v10)?)
- Reinstalled Android Studio
- Started the Android Device Emulator
- Ran expo start
- Entered 'Tunnel Mode' via the browser (see screenshot below)
- Clicked 'Run on Android Device'
and bingo it worked. If you have trouble, be sure you kill all adb processes before you start the process and try again.
Solution 2:[2]
I found a working solution on my system.
1- I deleted all of the emulators from 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...
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.
3- Now in android studio again, Tools --> SDK manager --> Android SDK, and check the box in front of 'show package detail'. Look for Google APIs Intel x86...(check the box) under Android 12 (S), click apply to install again.
4- Tools--> Device manager --> create Device. Set up a new emulator device
connect it with Metro Bundler.
Cheers, it worked for me without uninstalling the entire android studio.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jat90 |
Solution 2 |