我正在尝试使用react-native
库运行react-native-run-android
Android模拟器,但是我收到以下错误:
无法启动 '的/ usr / local / bin中/../模拟器/ QEMU /达尔文-x86_64的/ QEMU系统-I386'
我已成功安装emulator
,我可以从Android Studio > AVD Manager
运行android。
答案 0 :(得分:0)
该库正在寻找/usr/local/emulator
文件夹(但它已安装在另一个目录中)。首先,我检查了目录是否存在(它没有),找到了安装目录的实际位置,然后创建了一个指向实际文件夹位置的符号链接。最后,检查所请求的目录是否存在,然后一切正常。
$ 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