我正在尝试构建一个名为有线大脑的应用程序时,我今天收到此错误。我已经按照教程,但我注意到gradle构建失败。
错误详见以下日志:
失败:构建因异常而失败。
resultCall
运行此命令时出现此错误:ionic cordova run android
这是我的傻瓜:
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not find common.jar (android.arch.core:common:1.0.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.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.0.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] An error occurred while running cordova run android (exit code 1).
请非常感谢任何帮助。
答案 0 :(得分:0)
每https://stackoverflow.com/a/50564412/137259
确保您的/platforms/android/build.gradle具有:
allprojects {
repositories {
maven { url "https://maven.google.com" } //this line must be above jcenter()
jcenter()
}
}