Android Gradle DexException: Multiple dex files define Lorg/hamcrest/Description

后端 未结 4 1184
灰色年华
灰色年华 2020-12-01 10:53

com.android.dex.DexException: Multiple dex files define Lorg/hamcrest/Description

occurring while trying to do a debug build/test either via Android

4条回答
  •  余生分开走
    2020-12-01 10:59

    Robolectric 2.3 depends on JUnit 4.8.1 (version explicit). You're importing JUnit 4.10 (version explicit). Hamcrest is probably simply the first of many duplicates that dex is choking on - try changing your JUnit requirement version to 4.8+ (or excluding JUnit from the Robolectric dependency).

提交回复
热议问题