Error Error initializing classpath: Connection timed out: connect (Use --stacktrace to see the full
来源:互联网 发布:同花顺云计算 编辑:程序博客网 时间:2024/06/08 17:22
参考文章:http://cache.baiducontent.com/c?m=9d78d513d99007b8589cc93e5801d6160e54f7743da785552c82cd1f84652b564711f4ba5767505791872b2716ae394bea87217347557df2c796d5198bac935838885023716cd01c578f47f2981032c050cb06aff859bbe9ae2593df848e9a080d9700536d81809c5a7703cb1fa84775b0b19838025e63adec4062f54d3069c12c1af001bbf7331d1a9cb79b0f1d9a77943651c3f168f52912c242f940066703f70df7530c7a71fd4f2cf5413b0396ed40bc77251b72a148c5e986edb51e9bdc9c62c4ac8bf274c377e6b3bdb9311f3045fa53fbf1eaee2a643354848f82489961eaedeccc19a947814e0b&p=92759a46d6c606dd0be2963649478c&newp=9f3fce16d9c11fb51fbd9b7d0d138c231610db2151d4d54b6593&user=baidu&fm=sc&query=at+org%2Egradle%2Ewrapper%2EDownload%2EdownloadInternal%28Download%2Ejava%3A58%29&qid=f93737f60005c1cc&p1=2
http://stackoverflow.com/questions/29874564/ionic-build-android-error-when-download-gradle
今天在grails工程目录下面运行命令grails run-app出现如下错误:
D:\Projects\Grails\project\HelloWorld>grails -stacktrace
Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this releas
e.
| Error Error initializing classpath: Connection timed out: connect (NOTE: Stack
trace has been filtered. Use --verbose to see entire trace.)
java.net.ConnectException: Connection timed out: connect
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.tooling.internal.consumer.DistributionFactory$ProgressRepo
rtingDownload.download(DistributionFactory.java:177)
at org.gradle.wrapper.Install$1.call(Install.java:62)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistri
bution$1.call(DistributionFactory.java:122)
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistri
bution$1.call(DistributionFactory.java:116)
| Error Error initializing classpath: Connection timed out: connect
先看下老外解决改问题的原文内容:
I am using Ionic version 1.7.14 and the distributionUrl found in the following file. myApp/platforms/android/cordova/lib/builders/GradleBuilder.js.
I had to point the locally downloaded gradle as specified in this answer.
I had the same problem. I added gradle to my project offline.
After downloading gradle from issued link (here is http://services.gradle.org/distributions/gradle-2.2.1-all.zip) paste it in somewhere likes myApp\platforms\android\gradle\gradle-2.2.1-all.zip and in build.js from myApp\platforms\android\cordova\lib\build.js find this:
var distributionUrl = 'distributionUrl=http\\://services.gradle.org/distributions/gradle-2.2.1-all.zip';
And replace it with your own file's location:
var distributionUrl = 'distributionUrl=../gradle-2.2.1-all.zip';
------------------------------------------------------------------------------------------------------------------------------------------------
看错误信息,很明显是因为下载gradle超时引起的(我这里的网络不是很好哈)
解决方法:
1、手动下载自己需要的gradle版本,如我需要的是: gradle-2.9-bin.zip
官方各个版本下载地址:https://services.gradle.org/distributions/ // 貌似下载很慢或下载不了哈。。。
2. 打开文件gradle-wrapper.properties,如我的grails工程中该文件所在位置是:工程根目录\gradle\wrapper\gradle-wrapper.properties
3. 用#号注释掉原先的distributionUrl,然后再写一行,将其值改成我们下载的gradle的包所在路径即可
#distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
distributionUrl=./gradle-2.9-bin.zip
如我的设置截图如下:
- Error Error initializing classpath: Connection timed out: connect (Use --stacktrace to see the full
- Error| Error initializing classpath: Connection timed out: connect(Use--stacktrace to see the full )
- Error:Connection timed out: connect
- Error:Connection timed out: connect.
- Error:Connection timed out:connect.
- Network error IOException: Connection timed out: connect
- Gradle Error: Connection timed out connect.
- Android Studio Error:Connection timed out: connect.
- ERROR: transport error 202: connect failed: Connection timed out
- Launch error: Failed to connect to remote VM. Connection timed out
- Eclipse 远程调试 “Failed to connect to remote VM. Connection timed out ” error,
- Error -27796: Failed to connect to server "ip地址": [10060] Connection timed out
- android studio failed to open zip file .Android Studio Error:Connection timed out: connect.
- ERROR 2003 (HY000): Can't connect to MySQL server on '172.27.9.252' (110 "Connection timed out")
- android studio failed to open zip file .Android Studio Error:Connection timed out: connect.
- Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy...
- ERROR:java.net.ConnectException: Connection timed out: connect
- Android Studio Error:Connection timed out: connect.解决方案
- 机器学习算法工程师的经典面试问题
- 汉字转大写拼音总结
- javaUI 使用举例
- 最长公共子序列
- 魔镜
- Error Error initializing classpath: Connection timed out: connect (Use --stacktrace to see the full
- C++第一次实验试题(2)
- 文章标题
- POJ 1986 Distance Queries(离线tarjan-LCA)
- 测试用例设计之一——Orthogonal Array Testing Strategy(OATS)
- Android UI系列-----ImageView的scaleType属性
- Codeforces Round #345 (Div. 2) D. Image Preview【二分】
- Cookie/Session详解
- Ubuntu14.04下安装Chrome出现“未安装软件包 libappindicator1”问题的解决办法