Android Bug:Error:com.android.dex.DexException: Multiple dex files define Landroid/support/design/wi
Posted 风之旅人
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Bug:Error:com.android.dex.DexException: Multiple dex files define Landroid/support/design/wi相关的知识,希望对你有一定的参考价值。
项目编译通过,运行时出现异常:
Error:com.android.dex.DexException: Multiple dex files define Landroid/support/design/widget/CoordinatorLayout$LayoutParams;
方式一:在module项目下运行 :
而且还不容易看出来
gradle -q dependencies //项目中依赖比较多的话,会很慢。。。
方式二:(亲测有效)
module的build.gradle中统一基本包的引用: -- sync→clean→rebuild!
//base
implementation \'com.android.support:support-v4:27.1.1\'
implementation \'com.android.support:appcompat-v7:27.1.1\'
implementation \'com.android.support:cardview-v7:27.1.1\'
implementation \'com.android.support:design:27.1.1\'
implementation \'com.android.support:recyclerview-v7:27.1.1\'
参考:https://www.jianshu.com/p/7263f06f3307
以上是关于Android Bug:Error:com.android.dex.DexException: Multiple dex files define Landroid/support/design/wi的主要内容,如果未能解决你的问题,请参考以下文章
寻找bug并消灭系列——记录在Android开发所遇到的bug