Apache Cordova构建Android错误

时间:2017-01-15 23:10:54

标签: android cordova gradle

大家好,我无法找到解决此错误的方法:

// THIS IS THE COMMAND THAT I ISSUED: 
F:\MyRepo\storeApp>cordova build android

// Repsonse
ANDROID_HOME=F:\Cordova\android-sdk-windows
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
Subproject Path: CordovaLib

FAILURE: Build failed with an exception.

错误:

配置根项目'android'时出现问题。

  

无法解析配置':classpath'的所有依赖项。   无法解析com.android.tools.build:gradle:2.2.0。

建立失败

失败:构建因异常而失败。

* 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/151.101.24.209] failed: Read timed out
      > 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/108.168.243.150] failed: Read timed out

我已安装了所有必要的要求:

 F:\MyRepo\storeApp>cordova requirements

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-17,android-24,android-25,Google Inc.:Google APIs:17,Google Inc.:Google APIs:24
Gradle: installed

我似乎无法找到解决方案,非常感谢任何帮助。

0 个答案:

没有答案