zoukankan      html  css  js  c++  java
  • ReactNative问题随记1 Exception in thread "main" java.lang.RuntimeException: gradle-2.14.1-all.zip

    ReactNative问题随记

    想运行在真机上,在运行命令react-native run-android遇到错误如下:

    Scanning 559 folders for symlinks in D:AppDataProjectandroidAwesomeProject ode_modules (46ms)
    JS server already running.

    Building and installing the app on the device (cd android && gradlew.bat installDebug)...
    Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: C:Userslipp.gradlewrapperdistsgradle-2.14.1-all8bnwg5hd3w55iofp58khbp6yvgradle-2.14.1-all.zip
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:61)
    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

    截图如下:

     去路径上去找发现缺少文件,首次运行命令react-native run-android 会下载gradle编译器,虽然设置了但一直失败

    解决方案:

    1.直接去下:http://services.gradle.org/distributions/   找到文件对应版本的文件 gradle-2.14.1-all.zip 下载

    打不开的可以去我网盘上下载:https://pan.baidu.com/s/1nvealoX  (gradle-2.14.1-all.zip)

    下载后放到C:Userslipp.gradlewrapperdistsgradle-2.14.1-all8bnwg5hd3w55iofp58khbp6yv   下,然后右键该文件属性,看是否被锁定,如果锁定点击解除锁定

    注意文件路径一般是:C:Users{你的账号}.gradlewrapperdistsgradle-2.14.1-all{随机文件夹}

  • 相关阅读:
    DFA最小化,语法分析初步
    第八次——非确定的自动机NFA确定化为DFA
    正规式到正规文法与自动机
    正规文法与正规式
    词法分析程序的设计与实现
    4.文法和语言总结与梳理
    第一次博客作业
    欧几里得算法
    更项减损术
    南京航空航天大学戴华《矩阵论》习题答案
  • 原文地址:https://www.cnblogs.com/lipanpan/p/7419335.html
Copyright © 2011-2022 走看看