CLI installation not working (Missing google_app_id)

Viewed 307

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.

2 Answers

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.

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.

Related