FirebaseExtended / codelab-friendlyeats-flutter

FlutterFire Firestore codelab. Develop a cross platform restaurant recommendation app with Flutter.
Apache License 2.0
78 stars 36 forks source link

Add Firebase to your Android App - skips `build.gradle` modifications #20

Open cklanac opened 2 years ago

cklanac commented 2 years ago

In Step 6 here: https://codelabs.developers.google.com/codelabs/friendlyeats-flutter/#5

The "Add Firebase to your Android App" suggests you can skip modifications to the build.gradle

"10. Back in the Firebase console, skip the remaining steps, and go back to the main page of the Firebase console."

This will cause errors such as:

FirebaseException ([core/not-initialized] Firebase has not been correctly initialized.

Usually this means you've attempted to use a Firebase service before calling `Firebase.initializeApp`.

View the documentation for more information: https://firebase.flutter.dev/docs/overview#initialization
    )

Please add steps to implement the build.gradle modifications

In android/build.gradle

In android/app/build.gradle

ditman commented 2 years ago

This is a great addition. The Firebase plugins for Flutter have changed a bit since the Friendlyeats Flutter codelab was written (and it hasn't been updated yet, as you've encountered!)

This is a more modern Flutter + Firebase codelab that might be less problematic to follow, until this one gets updated again!

https://firebase.google.com/codelabs/firebase-get-to-know-flutter#0