Issue
Because of the bug in firebase_auth plugin I'm getting Java memory error reports in Crashlytics. So I want to pin firebase-auth Android plugin to 20.0.4 version.
I added classpath 'com.google.firebase:firebase-auth:20.0.4' buildscript dependency to android/build.gradle. I also specified Android plugin version in locally cached Flutter plugin's build.gradle with implementation 'com.google.firebase:firebase-auth:20.0.4' (version was not specified here).
I also tried Android project clean and Flutter clean. But the errors are still present because plugin version is not changed. I checked my APK - it has firebase-auth.properties file with the following content:
version=21.0.3
client=firebase-auth
firebase-auth_client=21.0.3
Why is it still 21.0.3 and how to change that?
UPDATE:
I tried upgrading to 21.0.5 and it works, but downgrade does not work.
Solution
The thing is firebase_core is using Firebase Android BoM, and BoM version specifies the versions of all Firebase Android packages.
I discovered it by running the following command from android directory:
./gradlew app:dependencies
So, the right way to pin Firebase Auth Android plugin in a Flutter app is to pin firebase_core Flutter plugin. I pinned it to 1.13.1 and it worked. Also had to downgrade firebase_crashlytics because it could not compile with the old firebase_core.
Answered By - flomaster
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.