Starting 0 tests on test(AVD) - 10
Tests on test(AVD) - 10 failed: Instrumentation run failed due to 'Process crashed.'
com.android.build.gradle.internal.testing.ConnectedDevice > No tests found.[test(AVD) - 10] FAILED
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).
So I'm running Tests on my CI and this error pops up randomly and sometimes it finds the 2 tests and runs it. But the majority of the time I'm getting this.
For me this happened when the test runner for the instrumented tests was wrong. I changed
android {
// ...
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
// ...
}
to
android {
// ...
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// ...
}
Note that I used KTS (build.gradle.kts) but this shouldn't matter for the problem, the syntax is just slightly different.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With