[英]Execution failed for task ':app:multiDexListDebug'
Please can anyone help me in my issue I got this exception but I don't know why and I can't fix it请任何人都可以帮助我解决我的问题我遇到了这个异常但我不知道为什么而且我无法修复它
Execution failed for task ':app:multiDexListDebug'.任务“:app:multiDexListDebug”执行失败。
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes . A failure occurred while execution com.android.build.gradle.internal.tasks.Workers$ActionFacade Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio#duplicate_build/classesencies了解如何解决问题Program type already present: com.share.albir.MainActivity程序类型已经存在:com.share.albir.MainActivity
defaultConfig {
applicationId "com.share.albir"
minSdkVersion 23
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation project(path: ':oppwa.mobile')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.google.android.gms:play-services-wallet:16.0.1'
}
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
android.enableDexingArtifactTransform=false
org.gradle.parallel=false
Note that: I'm not used firebase in my app and this solution not working for me enter link description here请注意:我没有在我的应用程序中使用 firebase 并且此解决方案对我不起作用在此处输入链接描述
Try the following step:请尝试以下步骤:
1. File-> Invalidate Cache -> Invalidate & Restart
2.Go to android/app/build.gradle and add the following lines of codes:
dependencies {
implementation 'com.android.support:multidex:2.0.1' //enter the latest multidex version
}
android {
defaultConfig {
multiDexEnabled true
}
}
3.flutter upgrade
Thank you,谢谢,
The issue was gone when I put this two lines当我把这两行放在一起时,问题就消失了
minifyEnabled false
shrinkResources false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.