je rencontre cette erreur quand je lance test expresso, le journal complet est:java.lang.NoClassDefFoundError: résolution manquée de: LORG/JUnit/coureur/notification/RunListener
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/junit/runner/notification/RunListener;
at android.support.test.internal.runner.RunnerArgs$Builder.fromBundle(RunnerArgs.java:150)
at android.support.test.runner.AndroidJUnitRunner.parseRunnerArgs(AndroidJUnitRunner.java:224)
at android.support.test.runner.AndroidJUnitRunner.onCreate(AndroidJUnitRunner.java:199)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4698)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.junit.runner.notification.RunListener" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/ro.adr.test.test-1/base.apk", zip file "/data/app/ro.adr.test-1/base.apk"],nativeLibraryDirectories=[/data/app/ro.adr.test.test-1/lib/x86, /data/app/ro.adr.test-1/lib/x86, /vendor/lib, /system/lib]]
Je suis sûr que dans la construction projet .gradle et bibliothèque build.gradle n'a pas de conflit JUnit, voici mon app/build.gradle
dependencies {
compile project(":adr")
compile fileTree(dir: 'libs', include: ['*.jar'])
// compile 'junit:junit:4.12'
compile 'org.hamcrest:hamcrest-core:1.3'
testCompile 'junit:junit:4.12'
String ver = "23.4.0"
compile "com.android.support:design:${ver}"
compile files("${System.env.HOME}/Dropbox/jvs/ro2/build/libs/ro2.jar")
androidTestCompile('com.android.support.test:runner:0.5')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2')
compile 'com.github.javafaker:javafaker:0.10'
}
Où sont vos dépendances de test? 'testCompile 'junit: junit: 4.12'' – thaussma