I\'m using AndroidJUnitRunner with Espresso.
I wrote a simple test but always receive this exception. According to Stackoverflow answers, the problem is messing up the J
I found the problem. It was missed code in build.gradle in the main module. If you have this problem I advise to start with adding this line:
build.gradle
android { ... defaultConfig { ... testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' } ... }