下記のようにdex file cannot exceed 64K
と出た場合
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
android/app/build.gradleに下記のような設定をおこなうことで解消します。
...
android {
...
defaultConfig {
...
multiDexEnabled true
}
...
}
...
dependencies {
implementation 'com.android.support:multidex:1.0.3'
...
}
...
FlutterでCloud Firestoreが動かないの対応の方がよいかもしれない。
参考
Issue with cloud_firestore - Cannot fit requested classes in a single dex file.