[英]react-native > Running android simulator results in “Could not launch” emulator error
I'm trying to run a react-native
android simulator using the react-native-run-android
library, but I receive the following error: 我正在尝试使用
react-native-run-android
库运行react-native
android模拟器,但是出现以下错误:
Could not launch '/usr/local/bin/../emulator/qemu/darwin-x86_64/qemu-system-i386'
无法启动'/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
. 我已经成功安装了
emulator
,并且可以从Android Studio > AVD Manager
运行android。
The library is looking for an /usr/local/emulator
folder (but it was installed in another directory). 该库正在寻找
/usr/local/emulator
文件夹(但它已安装在另一个目录中)。 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.
最后,检查请求的目录是否存在,然后一切正常。
$ 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.