Reputation: 3460
Execution failed for task ':app:mergeDexDebug'. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade 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
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, 1.21.0-9.2.pre, on Microsoft Windows [Version 10.0.18362.1082], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] VS Code (version 1.49.0)
[√] Connected device (3 available)
android/app/build.gradle
add multiDexEnabled true
android {
defaultConfig {
...
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
}
...
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
Reference: https://developer.android.com/studio/build/multidex
Upvotes: 0
Views: 987
Reputation: 80934
Update the minSdkVersion
:
minSdkVersion 15
to
minSdkVersion 23
Upvotes: 1