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:\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的更多相关文章
- 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 ...
- 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. ...
- 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数据库启动一下,然后再配置其 ...
- 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 ...
- 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" ...
- Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
在学习CGlib动态代理时,遇到如下错误: Exception in thread "main" java.lang.NoSuchMethodError: org.objectwe ...
- GUI学习中错误Exception in thread "main" java.lang.NullPointerException
运行时出现错误:Exception in thread "main" java.lang.NullPointerException 该问题多半是由于用到的某个对象只进行了声明,而没 ...
- 执行打的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 ...
- Exception in thread "main" java.lang.ExceptionInInitializerError
Exception in thread "main" java.lang.ExceptionInInitializerErrorCaused by: java.util.Missi ...
随机推荐
- es6 总结知识点
1. let 和 const 只在代码块中有效 {} js块级作用域. const 定义的对象是可以改变其属性的 const a =[], b={} ; a.push(1); b.a=1; / ...
- 如何选择 Apache Tomcat 与 JDK 版本
Apache Tomcat Version
- Docker----与Asp.net core 的完美结合,在docker容器中创建Asp.Net Core 项目
在腾讯云上买了一个小容量的服务器,搭建一个docker环境后,可以尝试做一些单系统做起来很麻烦的东西.譬如说,你在windows OS或UbuntuOS中,突然想玩CentOS了,你可以选择将电脑再装 ...
- mysql 函数学习(常用)
1.时间函数(组1) SELECT CURRENT_DATE() AS date, CURRENT_TIME() AS `time`, CURRENT_TIMESTAMP() AS `timestam ...
- call(),apply()和bind()的区别
javascript中的每一个Function对象都有一个apply()和一个call()方法,它们的语法分别是: /*apply()方法*/ function.apply(thisObj[, arg ...
- Moq 在.net Core 单元测试中的使用
Moq,主要用来伪造接口的实现类,实现方法,属性 moq The most popular and friendly mocking framework for .NET What? Moq (pro ...
- apache atlas源码编译打包 centos
参考:https://atlas.apache.org/InstallationSteps.html https://blog.csdn.net/lingbo229/article/details/8 ...
- Macbook pro从购买服务器到搭建服务器环境(2)
这里是在Mac本地上安装软件遇到的坑,先总结一下 在装完mysql的时候,安装wget,这个时候遇到的问题是openssl软件包找不到,我已经不记得是什么时候安装的openssl了,所以用命令查一下 ...
- C++何时需要NEW对象,new和定义对象的区别
C++何时需要NEW对象 一.CString str; 不用new的内存区域是在栈,会自动分配空间,一般在局部变量时使用,函数结束后会自动释放空间, 定义对象就是申明对象(静态) str有系统创建并释 ...
- SQL Server 分区表上建立ColumnStore Index 如何添加新分区方法与步骤
在生产环境中会遇到这样的场景,一个表随着时间的推移,越来越大,这个时候我们开始动手为这个表建立分区来改进查询性能. 但是表过大上百个G的时候,在数据仓库中,为了改进查询性能,我们可以添加在分区表的基础 ...