skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. You might have to run flutter clean so it deletes your pubspec lock file and the build folder

    Then 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search