Flutter Firebase and Android issue - unable to initialise. Cannot find google-services.json with latest (sept 2020) migration instructions executed
After hours of struggle, I am able to figure out the solution.
First, add the 'google-services' plugin as a dependency inside of the android/build.gradle file:
buildscript { dependencies { // ... other dependencies classpath 'com.google.gms:google-services:4.3.3' } }
Lastly, execute the plugin by adding the following underneath the line apply plugin: 'com.android.application', within the /android/app/build.gradle file:
apply plugin: 'com.google.gms.google-services'
Building for Android# Open the /android/app/build.gradle file. Under dependencies add the multidex module, and enable it within the defaultConfig:
android {
defaultConfig {
// ...
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
source:https://firebase.flutter.dev/docs/installation/android/