Skip to content Skip to sidebar Skip to footer

Initializing Firebase In Modulair Android Project Written In Kotlin Gives Not Initialized Error

I'm having difficulty trying to implement firebase into an modulair android project written in kotlin. My structure looks like this: App Feature Base And then in my main act

Solution 1:

The com.google.gms.google-services Gradle plugin only works with modules that are Android application modules that apply the com.android.application plugin. It doesn't work with library modules or feature modules.

When you apply the google-services plugin, it will make changes to your app that allow it to initialize automatically, using information found in your google-services.json file.

Solution 2:

If you are using features (apply plugin: 'com.android.feature' ) then the apply plugin: 'com.google.gms.google-services' and the SDK's (api 'com.google.firebase.~~~~~~) need to be added to the baseFeature gradle file.

You should also add the google-services.json to this modules folder!

Post a Comment for "Initializing Firebase In Modulair Android Project Written In Kotlin Gives Not Initialized Error"