Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cklanac opened this issue Dec 29, 2021 · 1 comment
Open

Comments

@cklanac
Copy link

cklanac commented Dec 29, 2021

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

  • Add classpath 'com.google.gms:google-services:4.3.10' to dependencies

In android/app/build.gradle

  • Add apply plugin: 'com.google.gms.google-services'
@ditman
Copy link
Member

ditman commented Jan 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants