Start a new Flutter project and Connect it to Firebase
It can be tricky to get a new Flutter project to connect to Firebase and work. Version mismatches can be a real killer!
Some of the components have been migrated to a higher version of gradle than the default installation process provides.
Additionally, some of these components (firebase core) have been migrated to AndroidX which means your Android application also needs to use AndroidX.
1. Update Gradle
Update the classpath version in build.gradle
classpath 'com.android.tools.build:gradle:3.4.0'
update the zip gradle-wrapper.properties (it will suggest the latest if you run the project at this step)
gradle-5.1.1-all.zip
2. Convert to AndroidX
Add to gradle.properties
android.useAndroidX=true
android.enableJetifier=true