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:
- Created 5 years ago
- Reactions:46
- Comments:41 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@samtstern Any update on this issue?
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 withmappingFileUploadEnabled
set to true. The build fails with the following error:The issue is two years old and it is the highest voted firebase sdk github issue, shouldn’t it have a top priority?