Problem Integrating UIKit into an existing application

I am trying to integrated UIKit for android to an existing app using these tutorials:

While I have been successful and everything builds well, when I start the app and do a call to FirebaseAuth , the app crashes. The crash report indicates: Default FirebaseApp is not initialized in this process com.swiftoffice.swiftmed. Make sure to call FirebaseApp.initializeApp(Context) first.

This was not required before I imported UIKit into my application. When I called FirebaseApp.IntializeApp(Context) in my application and attempted FirebaseAuth again, another crash appeared indicating: java.lang.NullPointerException: Attempt to invoke virtual method ‘’ on a null object reference.

For additional reference, I am making a call to this function: FirebaseAuth.getInstance().getCurrentUser() != null when both crashes are triggered. I have not done anything additional in my Firebase or app and only attempted to follow the above tutorials up to this point. I am using Firebase Authentication, Firebase Database, Firebase Storage, Firebase Functions, Crashlytcs and Remote Config.

Hi @jlieow,

Make sure that you have added google-services.json file in your app.

Visit the below link and follow the steps to integrate Firebase.


My existing application already has an existing google-services.json file. It only breaks when I import UIKit.

Hi @jlieow,

We cannot replicate the issue at our end. Can you share the error log…?.

As we don’t have any firebase dependencies in our UI Kit library. So it shouldn’t effect your firebase implementation if you import it.


I decided to use the APIs instead.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.