[INF] [shellscript]
[INF] [shellscript] FAILURE: Build failed with an exception.
[INF] [shellscript]
[INF] [shellscript] * What went wrong:
[INF] [shellscript] A problem occurred configuring root project '''android'''.
[INF] [shellscript] > Could not resolve all dependencies for configuration ''':_debugApk'''.
[INF] [shellscript] > A problem occurred configuring project ''':CordovaLib'''.
[INF] [shellscript] > Could not resolve all dependencies for configuration ''':CordovaLib:classpath'''.
[INF] [shellscript] > Could not find com.android.tools.build:gradle:2.2.2.
[INF] [shellscript] Searched in the following locations:
[INF] [shellscript] https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
[INF] [shellscript] https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
[INF] [shellscript] Required by:
[INF] [shellscript] android:CordovaLib:unspecified
[INF] [shellscript]
[INF] [shellscript] * Try:
[INF] [shellscript] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[INF] [shellscript]
[INF] [shellscript] BUILD FAILED
[INF] [shellscript]
[INF] [shellscript] Total time: 4.64 secs
[INF] [shellscript] Error: /Users/xxxxxx/Documents/GitWorkspaces/xxxxxx-app/cordova/platforms/android/gradlew: Command failed with exit code 1 Error output:
[INF] [shellscript] FAILURE: Build failed with an exception.
[INF] [shellscript]
[INF] [shellscript] * What went wrong:
[INF] [shellscript] A problem occurred configuring root project '''android'''.
[INF] [shellscript] > Could not resolve all dependencies for configuration ''':_debugApk'''.
[INF] [shellscript] > A problem occurred configuring project ''':CordovaLib'''.
[INF] [shellscript] > Could not resolve all dependencies for configuration ''':CordovaLib:classpath'''.
[INF] [shellscript] > Could not find com.android.tools.build:gradle:2.2.2.
[INF] [shellscript] Searched in the following locations:
[INF] [shellscript] https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
[INF] [shellscript] https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
[INF] [shellscript] Required by:
[INF] [shellscript] android:CordovaLib:unspecified
[INF] [shellscript]
[INF] [shellscript] * Try:
[INF] [shellscript] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
手工修改
\platforms\android
目录 和 \platforms\android\CordovaLib
目录
下的 build.gradle 文件,
把
mavenCentral()
改成
jcenter {url "http://jcenter.bintray.com/"}