From eee3518d11dced613c6578d2df9be000a1faab1e Mon Sep 17 00:00:00 2001 From: "smain@google.com" Date: Wed, 17 Aug 2016 16:17:11 -0700 Subject: add workaround for annotations dependency conflict with espresso Change-Id: Ia5f06e35b034d207f19d061b27ddbecd66012130 --- .../testing/unit-testing/instrumented-unit-tests.jd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd b/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd index 00622ee95f7d..8fc4dcac25d4 100644 --- a/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd +++ b/docs/html/training/testing/unit-testing/instrumented-unit-tests.jd @@ -95,6 +95,19 @@ dependencies { } +
+

Caution: If your build configuration includes a +compile dependency for the support-annotations +library and an androidTestCompile dependency for the +espresso-core library, your build might fail due to a dependency +conflict. To resolve, update your dependency for espresso-core +as follows:

+
+androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+    exclude group: 'com.android.support', module: 'support-annotations'
+})
+
+

To use JUnit 4 test classes, make sure to specify