【发布时间】:2019-10-11 04:25:49
【问题描述】:
我已将 firebase 消息添加到我的 Flutter 项目中。
在 iOS 上运行良好,尝试在 Android 上运行时出错:
Android dependency 'androidx.localbroadcastmanager:localbroadcastmanager' has different version for the compile (1.0.0-rc01) and runtime (1.0.0) classpath. You should manually set the same version via DependencyResolution
我的配置:
在 pubspec.yaml 中
cloud_firestore: ^0.11.0+2
firebase_auth: ^0.11.1
firebase_messaging: ^5.0.1+1
在 android/build.gradle 中
classpath 'com.google.gms:google-services:4.2.0'
在android/app/build.gradle中
implementation 'com.google.firebase:firebase-core:16.0.9'
在 gradle.properties 中
android.useAndroidX=true
android.enableJetifier=true
【问题讨论】:
标签: android gradle flutter google-cloud-messaging