Android build fails over com.android.dex.DexException: Multiple dex files define Landroid/support

前端 未结 1 407
野趣味
野趣味 2021-01-15 08:37

In Android project were team primarily still uses Eclipse were added some 3rd parties libs, then Android Studio fails to run on device anf when running gradle build there is

相关标签:
1条回答
  • 2021-01-15 09:20

    Thanks to Guillermo Merino for hint. Yes there is android-support-v4.jar there.

    Solved with exclude as

    dependencies {
        compile fileTree(dir: 'libs', include: '*.jar', exclude: 'android-support-*.jar')
        //...
    }
    

    see also

    • Gradle Exclude or add reference for JAR file hard included inside library classes.jar
    • Top-Level Exception app:dexDebug --dex -no-optimize --output android studio
    • Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat
    0 讨论(0)
提交回复
热议问题