Closed Kalela closed 2 years ago
@Kalela Thank you for the report. It appears that our gradle plugin is causing the version of firebase-messaging to be selected as 19.0.0 instead of 22.0.0 for some build configurations. We are working on a fix for this, but in the meantime you can manually resolve the issue by adding the following to the build.gradle file for the android-onesignal_flutter module in the dependencies section.
implementation 'com.google.firebase:firebase-messaging:22.0.0'
It should look like this
dependencies {
api 'com.onesignal:OneSignal:4.4.1'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
}
I am trying to set up OneSignal for push notifications on Android. The app wont launch when I have
learning_text_recognition: ^0.0.2
Google ML Kit dependency in my pubspec.yaml along with onesignal_flutter(null safety). If the ML Kit dependency is removed it launches fine.Environment OneSignal Flutter SDK: ^3.0.0 Flutter SDK: ">=2.12.0 <3.0.0" ANDROID: 10 pubspec.yaml snippet
Steps to Reproduce Issue:
learning_text_recognition: ^0.0.2
into you dependencies in pubspec.yaml. (Copy pubspec.yaml file above)FAILURE: Build failed with an exception.
Duplicate class com.google.firebase.components.CycleDetector$1 found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0) Duplicate class com.google.firebase.components.CycleDetector$ComponentNode found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0) Duplicate class com.google.firebase.components.CycleDetector$Dep found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0) Duplicate class com.google.firebase.components.Dependency found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0) Duplicate class com.google.firebase.components.DependencyCycleException found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0) Duplicate class com.google.firebase.components.DependencyException found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0) Duplicate class com.google.firebase.components.EventBus found in modules jetified-firebase-common-18.0.0-runtime (com.google.firebase:firebase-common:18.0.0) and jetified-firebase-components-16.0.0-runtime (com.google.firebase:firebase-components:16.0.0)