【问题标题】:Flutter Notification OneSignal - Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'Flutter Notification OneSignal - 无法确定任务':app:compileDebugJavaWithJavac'的依赖关系
【发布时间】:2020-06-30 23:02:36
【问题描述】:

今天(2020 年 3 月 19 日)下午 1 点之后,我无法再编译我的 Flutter 应用程序。昨天我按照文档 (https://documentation.onesignal.com/docs/flutter-sdk-setup) 中的所有步骤进行操作,并且运行良好。我的fluter版本如下和onesignal:

Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [versão 10.0.18363.720], locale pt-BR)
onesignal_flutter: ^2.3.4

显示以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not find any matches for com.onesignal:OneSignal:[3.11.2,3.99.99] as no versions of com.onesignal:OneSignal are available.
     Required by:
         project :app
   > Could not find any matches for com.onesignal:OneSignal:[3.11.2,3.99.99] as no versions of com.onesignal:OneSignal are available.
     Required by:
         project :app > project :onesignal_flutter

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 20s

【问题讨论】:

  • 我在 5 小时后也遇到了同样的问题。我认为软件包 onesignal_flutter 暂时崩溃了。
  • 我刚刚禁用了包并从受影响的文件中删除了它的行,我的项目正在运行

标签: android firebase flutter push-notification flutter-dependencies


【解决方案1】:

在 app/build.gradle 中更新 onesignal 似乎可以解决问题

dependencies {
   // (OLD) implementation 'com.onesignal:OneSignal:3.11.4, 3.99.99'
    implementation 'com.onesignal:OneSignal:3.12.7'
}

【讨论】:

  • 非常感谢@user3136059,这个解决方案对我有用。
猜你喜欢
  • 2021-04-14
  • 2021-02-16
  • 2021-07-25
  • 2021-07-25
  • 2021-09-10
  • 1970-01-01
  • 2022-01-14
  • 2020-04-15
  • 2019-12-23
相关资源
最近更新 更多