错误:找不到设备/模拟器,在Genymotion上运行React Native

时间:2018-02-19 04:26:58

标签: reactjs native genymotion

我使用genymotion模拟器在mac上运行react native, react-native-cli:2.0.1 反应原生:0.53.0 节点:v8.9.4 当我运行react-native run-android时,我得到了这样的错误 ...

.....

Installing APK 'app-debug.apk' on 'GNexus5623 - 6.0' for app:debug
    11:17:39 E/DeviceMonitor: Adb connection Error:EOF
    11:17:39 E/DeviceMonitor: Connection attempts: 1
    Installed on 1 device.

    BUILD SUCCESSFUL

    Total time: 14.691 secs

    This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
    Starting the app (/Users/yan/Library/Android/sdk/platform-tools/adb shell am start -n com.vero/com.vero.MainActivity...
    error: no devices/emulators found

有没有人给我解决方案,谢谢

1 个答案:

答案 0 :(得分:2)

这对我有用(仅适用于基于debian的系统),请确保已配置genymotion以使用您的Android Sdk:

  • Open Genymotion
  • 点击设置图标
  • 转到ADB标签
  • 点击使用自定义Sdk工具。
  • 导航至您下载的文件夹

然后将其添加到.bashrc

export PATH=/home/{username}/Android/Sdk/tools:/home/{username}/Android/Sdk/platform-tools:$PATH