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 00622ee95f7d1..8fc4dcac25d48 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