gpt4 book ai didi

android - 无法解决**无法合并dex错误**

转载 作者:行者123 更新时间:2023-12-03 04:59:24 25 4
gpt4 key购买 nike

我知道这个问题已经被问过很多遍了,我搜索了它们,但无法解决我的问题。我添加了
multiDexEnabled true
还有
implementation 'com.android.support:multidex:1.0.3'
如一些答案所示,但无法解决。谁能帮我,因为这个问题发生了,所以我被困住了。

错误是“错误:任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug执行失败”。

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex`



我的build.gradle文件是
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "com.flashcardapp"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"


packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:multidex:1.0.3'

//pin edittext library
implementation 'com.alimuzaffar.lib:pinentryedittext:1.3.1'

// glide
implementation 'com.github.bumptech.glide:glide:3.7.0'

//amazon aws
implementation 'com.amazonaws:aws-android-sdk-core:2.6.22'
implementation 'com.amazonaws:aws-android-sdk-cognito:2.2.13'
implementation 'com.amazonaws:aws-android-sdk-s3:2.6.22'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.6.22'
implementation 'com.amazonaws:aws-android-sdk-ddb-mapper:2.6.22'
implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.6.+@aar') { transitive = true }
implementation 'com.amazonaws:aws-java-sdk-s3:1.11.323'

testImplementation 'junit:junit:4.12'

androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}

最佳答案

在app / build.gradle中执行以下操作:

android {
defaultConfig {
multiDexEnabled true
}
}

然后清理并重建您的项目。希望这有效:)

关于android - 无法解决**无法合并dex错误**,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50735463/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com