在API 15上运行浓缩咖啡测试时,出现NoClassDefFoundError InstrumentationResultPrinter

时间:2018-09-05 13:33:38

标签: android android-emulator android-4.4-kitkat android-espresso ui-testing

我想在我的测试设置中包含一个API级别15模拟器,以解决我遇到的一系列问题。不幸的是,当尝试在这样的模拟器上运行espresso测试时,出现以下崩溃:

E/AndroidRuntime(11862): java.lang.NoClassDefFoundError: android.support.test.internal.runner.listener.InstrumentationResultPrinter
E/AndroidRuntime(11862):    at android.support.test.runner.AndroidJUnitRunner.<init>(AndroidJUnitRunner.java:254)
E/AndroidRuntime(11862):    at org.ligi.trulesk.AppReplacingRunnerBase.<init>(AppReplacingRunnerBase.kt:10)
E/AndroidRuntime(11862):    at org.walleth.infrastructure.AppReplacingRunner.<init>(AppReplacingRunner.kt:5)
E/AndroidRuntime(11862):    at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(11862):    at java.lang.Class.newInstance(Class.java:1319)
E/AndroidRuntime(11862):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3900)
E/AndroidRuntime(11862):    at android.app.ActivityThread.access$1300(ActivityThread.java:123)
E/AndroidRuntime(11862):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185)
E/AndroidRuntime(11862):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(11862):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(11862):    at android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime(11862):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(11862):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(11862):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime(11862):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime(11862):    at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1246): Error in app org.walleth.offline running instrumentation ComponentInfo{org.walleth.offline.test/org.walleth.infrastructure.AppReplacingRunner}:
W/ActivityManager( 1246):   java.lang.NoClassDefFoundError
W/ActivityManager( 1246):   java.lang.NoClassDefFoundError: android.support.test.internal.runner.listener.InstrumentationResultPrinter
I/ActivityManager( 1246): Force stopping package org.walleth.offline uid=10043
I/ActivityManager( 1246): Killing proc 11862:org.walleth.offline/10043: force stop

还有其他人遇到此问题并找到解决方案/解决方法吗?

0 个答案:

没有答案