LoginSignup
1
0

More than 5 years have passed since last update.

【Flutter】firebase_admob を入れたら出てきた Unable to merge dex エラーの解決

Posted at

Flutterでadmobを使ってみようと、firebase_admobを入れたら以下のエラーが出てビルドできなくなりました。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

ググったらすぐに解決法が出てきました。

Flutterプロジェクトのandroid/app/src/build.gradlemultiDexEnabled trueを追加します。

...

android {
    ...

    defaultConfig {
        ...

        multiDexEnabled true
    }
    ...
}

参考

"Unable to merge dex" error with firebase_admob package · Issue #14874 · flutter/flutter

1
0
0

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
1
0