-
Notifications
You must be signed in to change notification settings - Fork 47
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
[bug]: Firebase Analytics is beeing disabled: Missing google_app_id #210
Comments
Hello, I registered the task #208, but although it is not the same problem, I believe the cause is the same |
@edimarvirtual Thanks for the quick response. Please look at these: Configuration for android just looks okay. |
Also I'm seeing this in LogCat:
So indeed the CLI did not add the required gradle configuration. |
Although this link is obsolete, this guide can help you check what may be missing or incorrect in your project. It is very useful for checking the settings that must be made in native Flutter projects. Some things that are in this guide are now done automatically by the CLI, but it might help you I don't use crashlytics yet, but there are also manual configuration details for everything consider that some things are obsolete, but I think it can help https://firebase.flutter.dev/docs/manual-installation/android |
Thank you for the link. I've already attempted to add the |
Btw should I open a separate discussion about this: "In case you did the setup with flutter cli, In the message https://goo.gl/NAOOOI URL is missleadiding as it redirects to this page: https://firebase.google.com/docs/android/setup which is configuration for android and NOT flutter." Thank you for you time. |
Any update on this ? Still getting this issue on android emulator |
I can only give a hint. The CLI did not work correctly, it didn't add the required configuration to all files, like build.gradle. After updating all files in android dir just like they're in a new flutter project and after browsing flutterfire_cli's source code I could make it work by manually adding what it needs to be there. I use the latest packages from firebase. |
@qwadrox Can you share what config should be added please ? Firebase Analytics is working fine for iOS but not submitting events on Android |
Well in android/build.gradle buildscript {
ext.kotlin_version = '1.9.0' //I use 1.9.0 here. I was using 1.8
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
// START: This below: I use 4.4.0 But when I did this post i was using: 4.3.15
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
// END
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
} android/app/build.gradle: plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
// START: If you use a new flutter project either this or
id 'com.google.gms.google-services'
// END:
}
...
// START: This here
apply plugin: 'com.google.gms.google-services'
// END:
android {
namespace "com.example.company"
compileSdkVersion 33
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
... I hope this helps. |
Hey folks, I would encourage you to use the latest dev version which ought to apply the plugin To install, run:
Let me know if that helps you set up your project. |
It did work for me, meaning it added the required gradle config and my original problem has been solved so I'm closing this issue. Note:
Since my original problem has been solved, Idk is it relevant or not. |
@russellwheatley I've tried this and it throws error
after manually updating classpath to this value it works fine: |
Is there an existing issue for this?
CLI Version
0.2.7
Firebase Tools version
12.5.3
Flutter Doctor Output
[✓] Flutter (Channel stable, 3.13.3, on Microsoft Windows [Version 10.0.22621.2134], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.4)
[✓] Android Studio (version 2022.3)
[✓] VS Code, 64-bit edition (version 1.81.1)
[✓] Connected device (4 available)
[✓] Network resources
Description
Despite following the documentation, using flutterfire cli, Firebase Analytics is beeing disabled: Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI
logs:
Steps to reproduce
Before hand I created a new firebase project, enabled Analytics
Sample project
https://github.com/qwadrox/firebase_flutter_repoduce_bug
Expected behavior
Analytics should be configured correctly.
In case you did the setup with flutter cli, In the message https://goo.gl/NAOOOI URL is missleadiding as it redirects to this page: https://firebase.google.com/docs/android/setup which is configuration for android and NOT flutter.
CLI should add required configuration to build.gradle files.
Screenshots
No response
Additional context and comments
Noticed this issue on my production app that has been signed as it should be. After i did this demo.
I made a mistake when initializing github repo and I discarded changes, after I created a new project with same name and repeated the steps but CLI didn't add this 2 line:
If this is still valid CLI should add them to both build gradle. So this should be added as well in app/build.gradle:
Currently it wouldn't add.
The text was updated successfully, but these errors were encountered: