LoginSignup
12
4

More than 5 years have passed since last update.

FlutterでCloud Firestoreがdex file cannot exceed 64Kで動かないときの対応

Posted at

下記のように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.

64K を超えるメソッドを使用するアプリの設定

12
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
4