com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
2017-11-13 11:36
796 查看
报错如下:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
项目中出现的原因
同一个依赖项目,多次compile,导致merge dex 失败
具体是这样
然后又依赖同一项目的top version导致
要其一即可
还有top version 使用了高compileSDK
要在project的build.gradle加入最新的sdk高版本脚本,强制所有module一律使用高版本
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
项目中出现的原因
同一个依赖项目,多次compile,导致merge dex 失败
具体是这样
compile('com.github.afollestad.material-dialogs:core:0.8.5.2@aar') { transitive = true }
然后又依赖同一项目的top version导致
compile 'com.afollestad.material-dialogs:core:0.9.5.0'
要其一即可
还有top version 使用了高compileSDK
要在project的build.gradle加入最新的sdk高版本脚本,强制所有module一律使用高版本
configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == 'com.android.support') { if (!requested.name.startsWith("multidex")) { details.useVersion '27.0.0' } } } }
相关文章推荐
- com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
- com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
- 错误:com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
- Android studio 3.0 com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
- java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge de
- android studio 在run后出现“com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex”
- Android报错集锦之二:Android studio 3.0 com.android.builder.dexing.DexArchiveMergerException: Unable to mer
- java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMerger
- java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMerger
- DexArchiveMergerException: Unable to merge dex
- 升级到Android Studio 3.0 运行项目报错DexArchiveMergerException: Unable to merge 解决汇总
- transformDexArchiveWithExternalLibsDexMergerForDebug unable to merge dex 问题
- transformDexArchiveWithExternalLibsDexMergerForDebug unable to merge dex 问题
- Android studio 从2.3.3升级到3.0transformDexArchiveWithExternalLibsDexMergerForDebug unable to merge dex
- Android 异常 Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack
- Android Bug Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file
- react native com.android.ddmlib.InstallException: Unable to upload some APKs我踩过的坑
- Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files defi
- Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/lidroid/xutils/task/TaskHandler;
- com.android.dex.DexIndexOverflowException: Cannot merge new index 66299 into a non-jumbo instruction