小编alb*_*ozd的帖子

在android模拟器上运行react-native

我尝试在我的mac上运行genymotion android模拟器上的react-native app.当我写react-native run-android它得到

Running /usr/local/opt/android-sdk/platform-tools/adb reverse tcp:8081 tcp:8081
error: closed
Could not run adb reverse: Command failed: /usr/local/opt/android-sdk/platform-tools/adb reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
MacBook-Pro-MacBook:ART-CarefulPeople macbook$ 
Run Code Online (Sandbox Code Playgroud)

然后我试过了:

  1. react-native start
  2. react-native run-android

同样的结果. …

adb android-emulator genymotion react-native react-native-android

27
推荐指数
5
解决办法
8万
查看次数