ReactNative问题随记

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

Scanning 559 folders for symlinks in D:\AppData\Project\android\AwesomeProject\node_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:\Users\lipp\.gradle\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv\gradle-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:\Users\lipp\.gradle\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv   下,然后右键该文件属性,看是否被锁定,如果锁定点击解除锁定

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

出处:http://www.cnblogs.com/lipanpan/

本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

 

ReactNative问题随记1 Exception in thread "main" java.lang.RuntimeException: gradle-2.14.1-all.zip的更多相关文章

  1. Exception in thread "main" java.lang.RuntimeException: Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, do

    继上一篇Hive: Exception in thread "main" java.lang.RuntimeException: Hive metastore database i ...

  2. storm报错:Exception in thread "main" java.lang.RuntimeException: InvalidTopologyException(msg:Component: [mybolt] subscribes from non-existent stream: [default] of component [kafka_spout])

    问题描述: storm版本:1.2.2,kafka版本:2.11.   在使用storm去消费kafka中的数据时,发生了如下错误. [root@node01 jars]# /opt/storm-1. ...

  3. Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

    hive安装时遇到的问题 解压后指定了hive-env.sh文件的Hadoop_home  & hive_conf 两个参数后,先直接bin/hive 用Derby数据库启动一下,然后再配置其 ...

  4. Idea运行时Scala报错Exception in thread "main" java.lang.NoSuchMethodError:com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V

    一.情况描述 使用idea +scala+spark,运行程序代码如下: package cn.idcast.hello import org.apache.spark.rdd.RDD import ...

  5. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

    学习架构探险,从零开始写Java Web框架时,在学习到springAOP时遇到一个异常: "C:\Program Files\Java\jdk1.7.0_40\bin\java" ...

  6. Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V

    在学习CGlib动态代理时,遇到如下错误: Exception in thread "main" java.lang.NoSuchMethodError: org.objectwe ...

  7. GUI学习中错误Exception in thread "main" java.lang.NullPointerException

    运行时出现错误:Exception in thread "main" java.lang.NullPointerException 该问题多半是由于用到的某个对象只进行了声明,而没 ...

  8. 执行打的maven jar包时出现“Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes”

    Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for ...

  9. Exception in thread "main" java.lang.ExceptionInInitializerError

    Exception in thread "main" java.lang.ExceptionInInitializerErrorCaused by: java.util.Missi ...

随机推荐

  1. js原型链+继承 浅析

    名称:    prototype--原型对象    __proto__--属性 原型链与继承网上搜索定义,看起来挺绕的 .先说继承: 所有的对象实例都可以共享原型对象包含的属性和方法  例如一个实例A ...

  2. vscode中tab键无法触发emmet快捷生成

    1.file——preference——setting 2.点击user setting的extensions 3.点击emmet 4.emmet下的edit in settings.json.添加代 ...

  3. LoadRunner脚本准备

    脚本录制1.启动LoadRunner2.打开VuGen在LoadRunner Launcher窗格中,单击创建/编辑脚本3.创建一个空白Web脚本在“新建虚拟用户”对话框里选择新建脚本的协议一般选择W ...

  4. 经验分享:PDF怎么提取页面

    PDF文件的页面有很多但有需要的并不是全部,有时候需要其中一页或几页的时候,这个时候我们就需要把单独的页面提取出来,这个时候应该怎么做呢,上次有小伙伴来询问小编,今天小编就为大家分享一下小编自己的编辑 ...

  5. lombok @Accessors用法

    @Accessors 翻译是存取器.通过该注解可以控制getter和setter方法的形式. fluent 若为true,则getter和setter方法的方法名都是属性名,且setter方法返回当前 ...

  6. HashMap 和 Hashtable 的 6 个区别

    HashMap 是非常重要且常用的一种集合,还有一个和它类似的集合即Hashtable,有必要知道它们之间的区别. 1.线程安全: Hashtable 是线程安全的,HashMap 则不是线程安全的. ...

  7. 解决ODBC连接Oracle数据库报Unable to connect SQLState=08004问题

    今天用ODBC连接Oracle数据库时,报了这么一个错“Unable to connect SQLState=08004 Oracle ODBC Ora-12154”,上网查了好久都说PowerDes ...

  8. NAT穿透解决

    1.各种网络环境下的P2P通信解决方法: (1)如果通信双方在同一个局域网内,这种情况下可以不借助任何外力直接通过内网地址通信即可:   (2)如果通信双方都在有独立的公网地址,这种情况下当然可以不借 ...

  9. PHP实现多维数组按指定值排序

    主要用到的PHP函数 array_multisort() .先实现指定多维数组一个字段排序 根据二维数组的id值来排序,转换后的数组格式如下: function arraySortByOneField ...

  10. Spring cloud定义学习

    今天讲到的最重要的内容: Spring cloud是什么? Spring cloud项目 spring cloud版本     什么事springcloud? spring cloud 为开发人员提供 ...