Skip to content Skip to sidebar Skip to footer

Firestore Crashing App With New Dependencies

Yesterday I updated the dependencies of Firestore with 17.1.1 and Google Services with 4.1.0. Now while launching the app it crashes. Note: If I change Google Services to 4.0.2, th

Solution 1:

There is no need to use FirebaseApp.initializeApp(context). Using only the dependencies is enough. So you shouldn't ever have to call it manually if you performed the standard integration, as it will be invoked automatically a startup via a ContentProvider that will initialize before any other Activity or Service. You can read Doug's post regarding on how to initialize Firebase on Android.

The problem in your code is that your are using for your project the alpha13 version for your gradle. To solve this, please change the following line of code:

classpath 'com.android.tools.build:gradle:3.3.0-alpha13'

to

classpath 'com.android.tools.build:gradle:3.2.0'

Will solve this issue.

Solution 2:

This is a confirmed bug in the play-services plugin 4.1.0 according to https://issuetracker.google.com/issues/112716914. The answer is to use an earlier version, e.g. 4.0.2.

Edit: Version 4.2.0 is released where the bug is fixed.

Solution 3:

Switching to 4.2.0 Solves the issue.

Post a Comment for "Firestore Crashing App With New Dependencies"