运行Android模拟器的错误:Spawn ADB Inoent
我使用Expo CLI创建了一个新的React Native应用程序。 iOS Xcode仿真器工作正常,但是对于Android模拟器的错误,
Error: spawn adb ENOENT
我尝试卸载并安装后启动CLI。试图删除模拟器并创建一个新的模拟器。他们都没有工作。
I created a new react native app by using the expo cli.
iOS Xcode Emulator is working fine but getting below error for android emulator
Error: spawn adb ENOENT
I tried to uninstall and install back expo-cli. Tried to delete the emulator and create a new one. None of them is working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我处在您的情况下,我刚刚安装了博览会,并试图在Mac上的模拟器中运行该应用程序。
显然,问题是Android_home和ADB并未设置在我的$路径中。
我通过参考选项3(我已经安装了Android Studio)的最高投票答案在这里。 如果您想知道我做了什么,默认情况下使用ohmyzsh,所以我做了以下操作:
在.zshrc文件中添加这两行。
然后在您的终端中运行此操作:
重新启动您的终端,现在一切正常!
I was in your same situation wherein I’d just installed expo and tried to run the app in an emulator on my Mac.
Apparently the problem was that ANDROID_HOME and adb weren’t set in my $PATH.
I solved it by referring to Option 3 (I already had android studio installed) of the top voted answer here. In case you want to know what I did, I use ohmyzsh by default so I did the following:
Add these two lines in the .zshrc file.
Then run this in your terminal:
Restart your terminal and now everything works!
在运行世博会时,我正面临问题。我通过运行此命令解决了它。
I was facing an issue while running the expo project. I solved it by running this command.