Cordova Gradle错误:找不到com.android.tools.build:gradle:3.0.1

时间:2019-03-21 11:30:47

标签: cordova gradle

我在使用cordova时遇到此错误:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:3.0.1.
     Searched in the following locations:
         https://maven.google.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
         https://maven.google.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
     Required by:
         project :

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

* Get more help at https://help.gradle.org

我已经安装了gradle 5.3,这是我的要求:

Java JDK:已安装1.8.0

Android SDK:已安装true

Android目标:已安装Google Inc.:Google API:17,android-27,android-17

Gradle:已安装的C:\ Gradle \ gradle-5.3 \ bin \ gradle

如何解决这个无聊的错误? :|

2 个答案:

答案 0 :(得分:0)

当我在公司防火墙后面工作时,我遇到了同样的问题。他们是中间人,这些站点证书未使用原始签名进行签名。我们必须将这些地址列入白名单。希望这可以帮助。

答案 1 :(得分:0)

作为伊朗开发人员,一切都与制裁有关... 使用VPN解决了我的问题。