Search code examples
androidretrofit2android-espressookhttpmockwebserver

jakewharton Espresso Idling Resource won't import


I'm writing tests using okhttp3, mockwebserver, and retrofit2 in Android/Kotlin.

Everything I look up tells me to use the jakewharton idling resource, but it will not import into my project.

screenshot

I got the info straight from Jake Wharton's github

Screenshot of my build.gradle build.gradle

  1. Is there anything I can do to fix this?
  2. Are there decent alternatives to adding this type of idle resource to my test suite?

Solution

  • It looks like the build.gradle dependencies no longer support androidTestCompile.

    The dependency should switch from:

    androidTestCompile 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'

    to

    androidTestImplementation 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'