The project was compiled successfully, and an exception occurred at runtime
Error:com.android.dex.DexException: Multiple dex files define Landroid/support/design/widget/CoordinatorLayout$LayoutParams;
Method 1: run under the module project
And it’s not easy to see
gradle -q dependencies //项目中依赖比较多的话,会很慢。。。
Method 2: (parent test is effective)
Reference of unified basic package in build.gradle of module: – 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'
Similar Posts:
- Android Studio compilation: Program type already present: XXX solution
- Flutter: Android dependency ‘com.android.support:support-v4’ has different version …
- [Solved] Android Studio Conflict with dependency ‘com.android.support:support-annotations’
- Actionbar expiration problem
- [Solved] Duplicate class com.blankj.utilcode.BuildConfig found in modules classes.jar
- To solve the version compatibility problem of support library: the support package has a red underline when it is introduced
- Android Studio Project Error: gradle project sync failed.Basic
- AndroidStudio 3: How to Export Jar File
- AndroidStudio Error:Failed to resolve: com.android.support:appcompat-v7:29
- Android studio import project, error e rror:Unsupported method : BaseConfig.getApplicationIdSuffix().