【发布时间】:2018-04-08 15:22:51
【问题描述】:
我在 Android 的一个库项目中有几个 Android 测试。当我从 Android Studio 运行测试时,它会运行,但是当我将它作为 Gradle 任务运行时,由于运行时 logcat 中出现以下异常,它无法运行。
Caused by: java.lang.ClassNotFoundException:
Didn't find class "javax.swing.tree.DefaultTreeCellRenderer"
on path: DexPathList[[zip file "/system/framework/android.test.mock.jar",
zip file "/system/framework/android.test.runner.jar"
我收到以下错误。
在 Nexus 5X - 8.1.0 上的测试失败:检测运行因“进程崩溃”而失败。
com.android.builder.testing.ConnectedDevice > No tests found.[Nexus 5X - 8.1.0] 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).
:app:connectedDebugAndroidTest FAILED
【问题讨论】:
标签: android android-gradle-plugin android-espresso android-instrumentation