我正在尝试构建并执行我的cordova项目,但我遇到了错误:
BUILD FAILED
Total time: 5.696 secs FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not find common.jar (android.arch.core:common:1.1.0). Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/common/1.1.0/common-1.1.0.jar
* 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 find common.jar (android.arch.core:common:1.1.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/common/1.1.0/common-1.1.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
重点是上周同一个项目能够建立/运行,今天不再工作了。 有人遇到过这个问题并找到了一些解决方案吗?
答案 0 :(得分:0)
打开平台/ android /然后build.gradle
在jcenter()
之前添加maven {url'https://maven.google.com'}allprojects
{
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
}
google()和maven {url'https://maven.google.com'}指向相同的repo,google()是Google的Maven repo快捷方式。您可以添加google()而不是maven {url'https://maven.google.com'}如果您正在使用:
Gradle> = v.4.x +
看来订单很重要, 这对我有用