react-native run-android 显示 Could not install the app on the device



  • 按照RN 官网步骤来的, 接入USB 后,运行adb devices 显示设备接入(已授权), 但是react-native run-android 之后报错:
    Exception in thread "main" java.io.FileNotFoundException: /Users/XXX/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0/gradle-2.4-all.zip.lck (Not a directory)
    at java.io.RandomAccessFile.open0(Native Method)
    at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:49)
    at org.gradle.wrapper.Install.createDist(Install.java:46)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    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


  • administrators

    gradle没有下载完成



  • 谢谢恩人 我重新下载下来看看


登录后回复