-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I do not know if this is a bug or my mistake, however, after updating the plugin to version 1.3.1 (from 1.2.4), I get an error in the console that interrupts my build.
Type com.learntoflutter.flutter_embed_unity_android.BuildConfig is defined multiple times.
This error refers to two files, one of which is located at
<path_to_project>\build\flutter_embed_unity_2022_3_android.transforms\f6262a68685fb9a64d06ca1ca87ae2a1\transformed\debug\com\learntoflutter\flutter_embed_unity_android\BuildConfig.dex
and second
<path_to_project>\build\flutter_embed_unity_6000_0_android.transforms\1f493b52a7d095f3ee2da881e422f41b\transformed\debug\com\learntoflutter\flutter_embed_unity_android\BuildConfig.dex
Full error text:
ERROR: <path_to_project>\build\flutter_embed_unity_2022_3_android.transforms\f6262a68685fb9a64d06ca1ca87ae2a1\transformed\debug\com\learntoflutter\flutter_embed_unity_android\BuildConfig.dex: D8: Type com.learntoflutter.flutter_embed_unity_android.BuildConfig is defined multiple times: <path_to_project>\build\flutter_embed_unity_2022_3_android.transforms\f6262a68685fb9a64d06ca1ca87ae2a1\transformed\debug\com\learntoflutter\flutter_embed_unity_android\BuildConfig.dex, <path_to_project>\build\flutter_embed_unity_6000_0_android.transforms\1f493b52a7d095f3ee2da881e422f41b\transformed\debug\com\learntoflutter\flutter_embed_unity_android\BuildConfig.dex
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Type com.learntoflutter.flutter_embed_unity_android.BuildConfig is defined multiple times: <path_to_project>\build\flutter_embed_unity_2022_3_android.transforms\f6262a68685fb9a64d06ca1ca87ae2a1\transformed\debug\com\learntoflutter\flutter_embed_unity_android\BuildConfig.dex, <path_to_project>\build\flutter_embed_unity_6000_0_android.transforms\1f493b52a7d095f3ee2da881e422f41b\transformed\debug\com\learntoflutter\flutter_embed_unity_android\BuildConfig.dex
Additional information:
pubspec.yaml:
flutter_embed_unity: ^1.3.1
flutter_embed_unity_6000_0_android: ^1.2.2
Unity 6000.0.32f1
Minimum API Level Android 10.0 (API level 29)
Target API Level Android 14.0 (API level 34)
settings.gradle:
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
gradle-wrapper-properties:
distributionUrl=https://services.gradle.org/distributions/gradle-8.3-bin.zip
build.gradle:
android {
...
compileSdk = 35
ndkVersion = "27.2.12479018"
...