Fixed
Status Update
Comments
ar...@google.com <ar...@google.com> #2
The link in the above description doesn't work external to google, expanded link: https://issuetracker.google.com/issues/73450636
ma...@tomtom.com <ma...@tomtom.com> #3
This will be fixed in the next release.
ar...@google.com <ar...@google.com> #4
We are getting the below output when we follow the instructions given in comment #3 .
$ adb shell am instrument -w -r -e debug false com.extension.runnercrashapp.test/android.support.test.runner.AndroidJUnitRunner
Client not ready yet..
Started running tests
Tests ran to completion.
Empty test suite.
Can you let us know whether we are missing configurations or steps here.
$ adb shell am instrument -w -r -e debug false com.extension.runnercrashapp.test/android.support.test.runner.AndroidJUnitRunner
Client not ready yet..
Started running tests
Tests ran to completion.
Empty test suite.
Can you let us know whether we are missing configurations or steps here.
ma...@tomtom.com <ma...@tomtom.com> #5
No you don't miss anything, you were able to reproduce this bug. The expected behavior is that the test PASS. Mentioned crash is visible in logcat.
ar...@google.com <ar...@google.com> #6
We have passed this defect on to the engineering team and will update this issue with more information as it becomes available.
ar...@google.com <ar...@google.com>
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #8
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
nk...@google.com <nk...@google.com> #9
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
ma...@tomtom.com <ma...@tomtom.com> #10
Looks good, thanks
Description
E/TestExecutor: Fatal exception when running tests
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/app/DialogFragment;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1962)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.app.DialogFragment" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.extension.runnercrashapp.test-2/base.apk"],nativeLibraryDirectories=[/data/app/com.extension.runnercrashapp.test-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1962)
it happens only if module from gradle dependency is excluded, for example:
implementation ("com.google.android.gms:play-services-analytics:11.0.4") {
exclude group: 'com.android.support', module: 'support-v4'
}
Tested on devices with Android 5 and 7.
With version 0.5 of com.android.support.test:runner it wasn't happening.
To reproduce, run android tests from android studio or gradle connectedCheck
Small example project is available here: