I have tried to solve this problem but it keeps giving me the same error.
I use the following firebase services:
I believe that this is due to the fact that half of Google's FlutterFire plugins are using old versions of their Android counterparts. As such, I've specified which versions to use in my app level build.gradle
. This probably isn't a permanent solution, but seems to have stopped the crashes in the mean time.
In the app level build.gradle
, add the following to dependencies
:
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-analytics:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.4'
implementation 'com.google.firebase:firebase-firestore:17.1.1'
implementation 'com.google.firebase:firebase-functions:16.1.1'
implementation 'com.google.firebase:firebase-messaging:17.3.3'
implementation 'com.google.firebase:firebase-storage:16.0.3'
Let me know if this works.
Edit: Only add the implementation
lines for the Firebase plugins that you are using. You can find the latest version of each here.