CLI installation not working (Missing google_app_id)
Asked Answered
Y

3

6

I've tried to install FlutterFire using CLI, but when I try to use logEvent() in my app, I have the following error:

Missing google_app_id. Firebase Analytics disabled.

I'm almost sure to have perfectly followed the configuration tutorial at https://firebase.flutter.dev/docs/cli

Can somebody tell me what is wrong ?

Thanks.

Yachting answered 15/12, 2021 at 16:24 Comment(0)
F
1

You may need to manually install Firebase if you're trying to use Analytics on Android. As stated in the configuration tutorial:

Some plugins or platforms do not fully support Dart-only Firebase initialization yet, if you need to use the plugins then the manual installation steps should be followed first.

Analytics, Crashlytics and Performance Monitoring are currently unsupported for Dart-only initialisation. The full list of supported and unsupported platforms for Dart-only initialisation is here.

Feeler answered 15/1, 2022 at 8:32 Comment(1)
When will Analytics supported for Dart-only Firebase initialization? For me, only Dart-only Firebase initialization works, manual initialization has issues. So I am not able use Analytics nowVoidable
D
0

The most recent documentation can be found in Using the CLI, which says:

With Dart-only initialization now supported, manually configuring and installing platforms is no longer required.

Also in Manual Installation:

Manual installation is not the recommended installation flow.

So, it is a bit confusing. I am also dealing with this error and have not fixed it. I also checked "Google Analytics for Firebase" and "Using Firebase Analytics" but could not find any references to manual installation.

Davidadavidde answered 16/1, 2022 at 21:43 Comment(3)
Since I do not have enough reputation, I could not comment on @Aliyu Yisa's answer, I had to post. I already know that this is not an answer, thanks.Davidadavidde
When linking to another document use something more descriptive than "this". Summarize where the link is going so people know if they want to click. "Don't use "click here" as link text" is a good article.Ferromanganese
Yes, I understand it's a bit confusing. As at the time I wrote that, I had to use manual initialisation to be able to use Analytics. The "recommended" way doesn't support all the plugins yet. Also, it seems Analytics is now supported.Feeler
C
0

Adding id "com.google.gms.google-services" to the app/build.gradle solved the problem for me.

plugins {
    id "com.android.application"
    id "kotlin-android"
    id "dev.flutter.flutter-gradle-plugin"
    id "com.google.gms.google-services"
}
Chef answered 14/11, 2023 at 6:14 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.