【问题标题】:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. (OneSignal)无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。 (一个信号)
【发布时间】:2022-01-17 17:18:59
【问题描述】:

我克隆了项目并得到了上述错误。代码运行正常,但我突然收到这些错误。

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 开始无法更新它们。我正在使用“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
}

谁能帮我解决这些问题?谢谢。

【问题讨论】:

    标签: android flutter android-studio flutter-dependencies onesignal


    【解决方案1】:

    此错误与 oneSignal 服务器有关。它倒下了。如果您关闭或重新启动 Android Studio,Android Gradle 会下载一些依赖项。由于服务器已关闭并且未下载依赖项,因此它开始抛出错误。有时也是由于网络连接造成的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-02
      • 2022-01-05
      • 1970-01-01
      • 2020-10-28
      • 2021-10-26
      • 2022-09-27
      • 2020-07-11
      • 2020-09-17
      相关资源
      最近更新 更多