SDK找不到 反复安装了很多次相关软件



  • 使用react-native run-android 的时候始终会报错,反复安装下载所有的文件,更换SDK存储地址 重启电脑 等都无法解决!~求助!这个要怎么处理一下?

    D:\newdemo>react-native run-android
    Scanning 557 folders for symlinks in D:\newdemo\node_modules (24ms)
    Starting JS server...
    Building and installing the app on the device (cd android && gradlew.bat installDebug)...

    FAILURE: Build failed with an exception.

    • What went wrong:
      A problem occurred configuring project ':app'.

    SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 18.788 secs
    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



  • C:\Users\ye>adb devices
    List of devices attached
    192.168.207.101:5555 device
    设备是有的


  • administrators

    @Yuppiezero 说:

    SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

    0_1497926959953_TIM截图20170620104907.png



  • 哦!谢谢!~ 发现问题了 ANDROID_HOME 写错了 多加了sdk



  • @晴明
    老师您好:
    Could not run adb reverse: Command failed: D:\BaiduYunDownload\eclipse\android-sdk-windows/platform-tools/adb -s 192.168.207.101:5555 reverse tcp:8081 tcp:8081

    8081 是不是被占用了?{ cmp=com.newdemo/.MainActivity }后面不能继续输入了

    environmental variables:
    ADB_TRACE - Print debug information. A comma separated list of the following values
    1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
    ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
    ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
    Could not run adb reverse: Command failed: D:\BaiduYunDownload\eclipse\android-sdk-windows/platform-tools/adb -s 192.168.207.101:5555 reverse tcp:8081 tcp:8081
    Starting the app on 192.168.207.101:5555 (D:\BaiduYunDownload\eclipse\android-sdk-windows/platform-tools/adb -s 192.168.207.101:5555 shell am start -n com.newdemo/com.newdemo.MainActivity)...
    Starting: Intent { cmp=com.newdemo/.MainActivity }


登录后回复