Dependency conflict error in my Android app which has Android Tests

后端 未结 5 2061
[愿得一人]
[愿得一人] 2020-12-08 13:46

I\'m using AndroidStudio and Gradle to build my Android app with tests in the \'androidTest\' source directory. I added a new dependency and am now getting the following iss

5条回答
  •  不思量自难忘°
    2020-12-08 14:01

    Alternatively, one can exclude the conflicting dependency (e.g. support annotations library) pulled in by the test app dependency (e.g. assertj-android), by using the following:

    testCompile('com.squareup.assertj:assertj-android:1.0.0') { exclude group: 'com.android.support', module: 'support-annotations' }

提交回复
热议问题