簡體   English   中英

無法確定任務 ':app:compileDebugJavaWithJavac' 的依賴關系。 (一個信號)

[英]Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. (OneSignal)

我克隆了項目並得到了上述錯誤。 代碼運行正常,但我突然收到這些錯誤。

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for com.onesignal:OneSignal:3.16.0: Skipped due to earlier error

我盡一切努力解決它,再次下載 gradle 文件,做了“Flutter clean”並通過使緩存無效重新啟動 android studio 但我不明白為什么 gradle sync.start 無法更新它們我正在使用“gradle-5.4.1-all”。 下面是我的 build.gradle 文件。

buildscript {
    repositories {
        google()
        jcenter()
        maven { url 'https://plugins.gradle.org/m2/' }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

有人可以幫我解決這些問題嗎? 謝謝。

此錯誤與 oneSignal 服務器有關。 它倒下了。 如果您關閉或重新啟動 Android 工作室,Android Gradle 下載一些依賴項。 由於服務器已關閉並且未下載依賴項,因此它開始拋出錯誤。 有時它也是由於互聯網連接。

暫無
暫無

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

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