class file for android.support.v4.widget.DrawerLayoutImpl not found on travis support-v4 21.0 class file for android.support.v4.widget.DrawerLayoutImpl not found on travis support-v4 21.0 android android

class file for android.support.v4.widget.DrawerLayoutImpl not found on travis support-v4 21.0


This sounds like a bug in travis. If it does not use Gradle to build everything but does some building on its own (which it sounds like, given that you have special YAML files listing dependencies), it needs to handle AAR file dependencies by not just including classes.jar, but jars under libs/ as well.


Manually adding the library to the server in build.gradle worked:

testCompile fileTree(dir: "${rootDir}/YourProject/build/intermediates/exploded-aar/com.android.support/support-v4/", include: "**/*.jar")


Edited Answer:

This issue is fixed by using the pre-compiled DrawerActions.java class from the espresso-contrib library. For setup instructions see the link.