【问题标题】:Gradle task assembleDebug failed while sync with firebase [closed]Gradle任务assembleDebug在与firebase同步时失败[关闭]
【发布时间】:2021-01-19 07:42:50
【问题描述】:
  • 出了什么问题: 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。

无法解析配置“:app:debugCompileClasspath”的所有任务依赖项。 找不到 com.google.firebase:firebase-analytics:。 要求: 项目:应用程序

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。

  • 通过https://help.gradle.org获得更多帮助

在 2 秒内构建失败 异常:Gradle 任务 assembleDebug 失败,退出代码为 1

【问题讨论】:

  • 你在build.gradle中添加com.google.firebase:firebase-analytics这个依赖了吗?
  • 添加你的 build.gradle 文件

标签: java android firebase android-studio flutter


【解决方案1】:

请尝试使用:

implementation 'com.google.firebase:firebase-core:16.0.1'

代替:

implementation 'com.google.firebase:firebase-analytics'

【讨论】:

  • firebase-core 不再需要!查看release notesfirebase-analytics 会工作的。
  • 是的,没错,但是有些人在使用firebase-analytics 时遇到了问题,这都可以通过使用firebase-core:16.0.1 来解决。
猜你喜欢
  • 2020-11-10
  • 2021-06-30
  • 1970-01-01
  • 2020-10-25
  • 2019-11-11
  • 2020-10-31
  • 1970-01-01
  • 2022-10-14
  • 2021-10-11
相关资源
最近更新 更多