Issue
I am trying to run Espresso tests (written in Kotlin) in Android Studio with the AccessibilityChecks enabled as documented here.
When I try using AccessibilityChecks within the tests, I get the following error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/base/Preconditions;
at android.support.test.espresso.accessibility.AccessibilityChecks.enable(AccessibilityChecks.java:80)
If I try moving it to a Before class like mentioned in the documentation:
Then it will fail with the error 'Empty test suite':
Solution
There are two issues reported here:
- Package 'com.android.support.test.espresso:espresso-accessibility:3.0.0' uses a Guava class but does not declare a dependency to Guava, resulting
in the errors reported in comments #1-#5.- Package 'com.android.support.test.espresso:espresso-accessibility:3.0.1'
seems to have duplicates of the
android/support/test/espresso/accessibility/R class, resulting in the error in
Both issues have been fixed and will be included in the 3.0.2-alpha2 release
If any issue persists, please report at Google issue tracker they will re-open to examine.
Answered By - Prags
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.