1

I'm trying to integrate a Flutter app with the add-to-app feature following the Official documentation which is outdated as per this thread. In my Flutter part's pubspec.yaml, I have this Dependency Library - firebase_core: ^2.4.1 And in my Android Project's App level build.gradle file, I have this -

implementation(platform("com.google.firebase:firebase-bom:31.0.3"))
implementation("com.google.firebase:firebase-core")

I was using 31.2.0, but since I started getting this error, I switched to 31.0.3 since that's what Flutter's package was using.

When I run flutter build aar and Sync android project the with Gradle, I get these errors - enter image description here

And when I just try to run the app, I see this - enter image description here

1 Answers1

0

Go to android->app->build.gradle and use implementation "com.google.firebase:firebase-core:21.1.1" instead of "com.google.firebase:firebase-core:". In my case that was the solution.

markosh498
  • 33
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 19 '23 at 08:32