新鲜的科尔多瓦建立错误 [英] Fresh Cordova build error

查看:78
本文介绍了新鲜的科尔多瓦建立错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Windows 10上安装了Cordova的新副本,并试图构建我的第一个Android应用程序(使用此

I just installed a fresh copy of Cordova on Windows 10 and am trying to build my first Android app (using this guide). It seems like the script couldn't download gradle-2.2.0.pom, I tried the URL and indeed the file isn't there. I am not sure where to go from here :/

c:\test\hello>cordova build android
ANDROID_HOME=C:\Users\Stuffe\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_112
Subproject Path: CordovaLib

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:2.2.0.
     Required by:
         :android:unspecified
      > Could not resolve com.android.tools.build:gradle:2.2.0.
         > Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
            > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
               > Connect to repo1.maven.org:443 [repo1.maven.org/127.0.1.2] failed: Connection refused: connect
      > Could not resolve com.android.tools.build:gradle:2.2.0.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
            >
BUILD FAILED

Total time: 3.134 secs
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
               > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/127.0.1.3] failed: Connection refused: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:2.2.0.
     Required by:
         :android:unspecified
      > Could not resolve com.android.tools.build:gradle:2.2.0.
         > Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
            > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
               > Connect to repo1.maven.org:443 [repo1.maven.org/127.0.1.2] failed: Connection refused: connect
      > Could not resolve com.android.tools.build:gradle:2.2.0.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom'.
               > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/127.0.1.3] failed: Connection refused: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

推荐答案

删除最新版本的gradle并安装gradle 2.1.4.现在尝试再次构建.它对我有用.

Remove the latest version of gradle and install gradle 2.1.4. Now try to build again. It worked for me.

这篇关于新鲜的科尔多瓦建立错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆