【发布时间】:2018-11-07 04:32:10
【问题描述】:
我正在尝试构建和执行我的 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.
关键是同一个项目上周能够构建/运行,而今天不再工作了。 有人遇到过这个问题并找到了解决办法吗?
【问题讨论】:
-
遇到了同样的问题。如果我删除 fcm 插件(ionic cordova plugin rm cordova-plugin-fcm)然后尝试构建,它可以工作。你也是这样吗?
-
我实际上通过这个解决方案得到了它stackoverflow.com/questions/49839322/… 我编辑了文件 ..platforms\android\build.gradle 和 ..platforms\android\CordovaLib\build.gradle 并在其中我替换了mavenCentral();使用 maven { url "maven.google.com" } 然后我删除 fcm 插件并再次添加,然后我可以构建并运行。我不知道这是否是一个“好”的解决方案。
-
我的项目中没有安装这个插件,但可能是我的一些插件导致了这个问题。我会试试这个解决方案,看看是否也对我有用。
-
我认为该解决方案并没有特别绑定到 fcm 插件
-
有效,但现在我遇到另一个错误:1-54:AAPT:找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster'。有什么想法吗?
标签: android cordova ionic-framework jcenter