-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
Steps to reproduce the bug:
- Open TestProject.zip
- Run included
ExampleInstrumentedTest
test - Tests will crash with following exception (in Logcat)
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.matejdro.testproject, PID: 15073
java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.matejdro.testproject.test/android.support.test.runner.AndroidJUnitRunner}: java.lang.ClassNotFoundException: Didn't find class "android.support.test.runner.AndroidJUnitRunner" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /vendor/lib]]
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5730)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.test.runner.AndroidJUnitRunner" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5728)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
When removing testInstrumentationRunnerArgument
line and everything JUnit5-related from dependencies
, tests start working again
What I did to create this test project:
- Create new Android project with Kotlin support and no activity
- Bump gradle version to 4.7 to allow plugin to work
- Copy paste all instrumented test gradle stuff from README to the gradle file
So it is basically bare minimum that is supposed to work. Am I doing something wrong here or is this a bug?
If it helps, I reproduced this on Nexus 5X x86
emulator with Android 8.0 (Google Play)
System image
Metadata
Metadata
Assignees
Labels
No labels