![](/img/trans.png)
[英]Flutter Notification OneSignal - Could not determine the dependencies of task ':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.