Created
August 7, 2020 07:12
-
-
Save ochim/49a6e2811181e4cb8a3c7b11d3d47f5d to your computer and use it in GitHub Desktop.
[Android]Task :app:multiDexListDevelopDebug FAILED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Android Studio 4.0.1にて | |
classpath 'com.android.tools.build:gradle:3.5.3' → | |
classpath 'com.android.tools.build:gradle:4.0.1' | |
にupdateした。 | |
Build APKすると | |
> Task :app:multiDexListDevelopDebug FAILED | |
AGPBI: {"kind":"error","text":"Type androidx.transition.R is defined multiple times: /Users/nijimac088/goo-memo-android/app/build/intermediates/transforms/RealmTransformer/develop/debug/1.jar:androidx/transition/R.class, /Users/nijimac088/goo-memo-android/app/build/intermediates/transforms/RealmTransformer/develop/debug/0/androidx/transition/R.class","sources":[{"file":"/Users/nijimac088/goo-memo-android/app/build/intermediates/transforms/RealmTransformer/develop/debug/1.jar"}],"tool":"D8"} | |
RealmTransformerとあるからRealm周りを疑ったが、結果違った。 | |
androidx.multidex:multidex:2.0.0 → androidx.multidex:multidex:2.0.1 | |
これでfix | |
Build APKできた! | |
multiDexで失敗したから、androidx.multidex:multidexのバージョンを上げたら、ビルドが成功した。 | |
・補足 | |
https://developer.android.com/studio/build/multidex#mdex-gradle | |
minSdkVersion が 21 以上の場合は multidex がデフォルトで有効であり、multidex サポート ライブラリは必要ありません。 | |
一方、minSdkVersion を 20 以下に設定している場合は、multidex サポート ライブラリを使用してアプリのプロジェクトに以下のように変更を加える必要があります。 | |
〜続く〜 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment