2

As a part of making the instant app version of my existing app, I made my current application module as base module and created a new application class. I moved the google-services.json to new application folder added the line apply plugin: 'com.google.gms.google-services' at the bottom of my new application class.

But now I am getting following error java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process null. Make sure to call FirebaseApp.initializeApp(Context) first.

I have called FirebaseApp.initializeApp(this); in the onCreate of my application class.

Am I missing anything ?

Ezio
  • 2,837
  • 2
  • 29
  • 45
  • 1
    could be a couple items, but generally, this stuff should go in the base module, please see https://github.com/googlesamples/android-instant-apps/blob/master/analytics/base/build.gradle, also see https://stackoverflow.com/questions/46666474/firebaseapp-initialization-unsuccessful-in-android-instant-apps – TWL Dec 07 '18 at 19:17
  • 1
    Also, if your `application` class is in your app-module, then your instant app won't have access to it. – TWL Dec 07 '18 at 19:21

0 Answers0