簡體   English   中英

科爾多瓦在Android上構建錯誤

[英]Cordova build error on android

我正在嘗試構建和執行我的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.

關鍵是同一項目上周能夠構建/運行,而今天不再工作。 任何人都有這個問題,並找到了解決方案?

打開platform / android /然后build.gradle

添加行家{URL ' https://maven.google.com jcenter之前'}()

allprojects
 {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}

google()和maven {url'https: //maven.google.com '}指向相同的存儲庫,google()是Google的Maven存儲庫快捷方式。 如果您正在使用,則可以添加google()代替maven {url'https: //maven.google.com '}:

Gradle> = v.4.x +

似乎順序很重要, 這對我有用

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM