question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initialize FirebaseApp without google-services.json

See original GitHub issue
  • Android Studio version: 3.2
  • Firebase Component: Core/Analytics(Database, Firestore, Storage, Functions, etc)
  • Component version: 16.0.4

[REQUIRED] Step 3: Describe the problem

I am trying to initialize the FirebaseApp, only by using the FirebaseOptions builder, like this, first thing in my application (I use only applicationId and ApiKey, since I only want the analytics for start) :

FirebaseOptions options = new FirebaseOptions.Builder()
                    .setApplicationId(applicationID) // Required for Analytics.
                    .setApiKey(apiKey) // Required for Auth.
                    .build();
FirebaseApp.initializeApp(context, options);

I do not have a google-services.json file in my project, I have removed the FirebaseInitProvider, like this, in my AndroidManifest.xml:

<provider
    android:name="com.google.firebase.provider.FirebaseInitProvider"
    android:authorities="${applicationId}.firebaseinitprovider"
    tools:node="remove"/>.

When starting the application, while trying to View events in the Android Studio debug log, like this: adb shell setprop log.tag.FA VERBOSE adb shell setprop log.tag.FA-SVC VERBOSE adb logcat -v time -s FA FA-SVC

I get Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI .

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:46
  • Comments:41 (6 by maintainers)

github_iconTop GitHub Comments

16reactions
ddukestermancommented, Jun 28, 2019

@samtstern Any update on this issue?

12reactions
iliaskompcommented, Jun 29, 2020

We are also affected from this issue since we are using a content provider instead of google-services.json. We are trying to migrate to firebase crashlytics with mappingFileUploadEnabled set to true. The build fails with the following error:

Crashlytics could not find the resource file generated by Google Services. You may need to execute the :process<Variant>GoogleServices Task. Please check your Firebase project configuration (https://firebase.google.com/docs/android/setup). 

The issue is two years old and it is the highest voted firebase sdk github issue, shouldn’t it have a top priority?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I initialize Firebase without using google-services.json?
xml file and then FirebaseApp.initializeApp() will find them at runtime. Not all of the keys are required, it depends what service you're using....
Read more >
Troubleshoot initialization options | Firebase - Google
Your application may be using an incomplete or erroneous google-services.json configuration file; or your app is programmatically initializing Firebase without ...
Read more >
How to use Firebase on Android without the google-services ...
Turn your google-services.json file into a strings.xml file with resources that Google/Firebase services need to initialize.
Read more >
[Flutter/FirebaseCore] Building app without google-services.json
If I call Firebase.initializeApp() then I see Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized. Have you ...
Read more >
Download Firebase config file or object - Google Help
Go to your the Settings icon · In the Your apps card, select the package name of the app for which you need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found