I’ve just configured Firebase for use with my app, and now when I try to build, Gradle throws me an error. I’ve tried deleting pubspec.lock and running pub get, and I have not seen any errors in my code. Does anyone know what might be causing this?
Any and all help is appreciated. TIA 🙂
2
Answers
I don’t have enough rep to just comment…
Please check this answer Why is riverpod failing even to initialize in project? Method not found: 'Error.throwWithStackTrace'
and see if upgrade Flutter/Dart to at least 2.10/2.16 solves your problem.
You might have to run
flutter clean
so it deletes your pubspec lock file and the build folderThen you run
flutter pub get to get depencies
The error might also be coming from your firebase configuration. Crosscheck it again
In the
android/app/build.gralde
file🔵 make sure that your
minSdKVersion
is >= 21. It is very important when you add some Firebase packages🔵 make sure you have multidexEnable set to true