【问题标题】:Gradle Build failing after adding firebase_messaging plugin添加 firebase_messaging 插件后 Gradle Build 失败
【发布时间】:2019-12-14 06:02:42
【问题描述】:

添加 firebase_messaging 插件 v5.1.2 后,我的应用无法构建,但每次我删除它时,应用都会正常构建,我得到的只是一条红色错误行,上面写着:Finished with error: Gradle task assembleDebug failed with exit代码 1

我已经尝试将我的应用程序迁移到 android X 但这没有帮助,尝试了 dex 但又没有任何帮助,我还尝试避免使用 android x 并使用旧版本的插件但没有用。 (使用 android X 迁移页面中列出的 v2.1.0)。

这些是我在我的应用中使用的所有插件,可能它们之间存在冲突?

firebase_core: ^0.4.0+6
firebase_auth: ^0.11.1+8
google_sign_in: ^4.0.4
cloud_firestore: ^0.12.7
firebase_storage: ^3.0.5
firebase_messaging: ^5.1.2
flutter_bloc: ^0.20.0
equatable: ^0.3.0
http: ^0.12.0+2
shared_preferences: ^0.5.3+4
image_picker: ^0.6.1
image_cropper: ^1.0.2
cached_network_image: ^1.1.1
intl: ^0.15.8

我的最终目标是在我的应用中从 firebase 获取通知

编辑:我创建了一个新项目,其中 firebase_messaging 是项目中唯一的插件,并且成功了! 但是我再次添加其他库时出现同样的问题

【问题讨论】:

    标签: android firebase gradle flutter firebase-cloud-messaging


    【解决方案1】:

    答案在 GitHub 上,希望对你有帮助 https://github.com/flutter/flutter/issues/37696

    【讨论】:

      猜你喜欢
      • 2019-07-11
      • 2020-08-15
      • 2020-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多