【发布时间】: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