0
votes

I'm trying to run a react-native android simulator using the react-native-run-android library, but I receive the following error:

Could not launch '/usr/local/bin/../emulator/qemu/darwin-x86_64/qemu-system-i386'

I have the emulator successfully installed, and I can run android from Android Studio > AVD Manager.

1

1 Answers

0
votes

The library is looking for an /usr/local/emulator folder (but it was installed in another directory). First I checked whether the directory existed (it didn't), found where the installation directory actually was, then created a symbolic link to the actual folder location. Finally, check the requested directory exists, then everything worked.

i.e.

$ ls -la /usr/local/emulator
ls: /usr/local/emulator: No such file or directory
$ which emulator
/usr/local/bin/emulator
$ ls -la /usr/local/bin/emulator
lrwxr-xr-x  1 user admin  64 13 Aug 09:56 /usr/local/bin/emulator -> /usr/local/Caskroom/android-sdk/3859397,26.0.1/emulator/emulator
$ sudo ln -s /usr/local/Caskroom/android-sdk/3859397,26.0.1/emulator /usr/local/emulator
Password:
$ ls "/usr/local/bin/../emulator/qemu/darwin-x86_64/qemu-system-i386"
/usr/local/bin/../emulator/qemu/darwin-x86_64/qemu-system-i386