加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Uiautomator依赖jar包找不到的提示

发布时间:2020-12-14 01:07:06 所属栏目:百科 来源:网络整理
导读:纯粹做个笔记 root@hammerhead:/data/local/tmp #uiautomator runtest /data/local/tmp/appsimulation.jar -c com.dkxy.appsimulation.AppSimulationTestCase#mainINSTRUMENTATION_STATUS: numtests=1INSTRUMENTATION_STATUS: stream=com.dkxy.appsimulation

纯粹做个笔记


root@hammerhead:/data/local/tmp #uiautomator runtest /data/local/tmp/appsimulation.jar -c com.dkxy.appsimulation.AppSimulationTestCase#main
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
com.dkxy.appsimulation.AppSimulationTestCase:
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: test=main
INSTRUMENTATION_STATUS: class=com.dkxy.appsimulation.AppSimulationTestCase
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS_CODE: 1
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
Error in main:
java.lang.NoClassDefFoundError: com.dkxy.appsimulationcommon.BaseSimulation
        at com.dkxy.appsimulation.AppSimulationTestCase.main(AppSimulationTestCase.java:22)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
        at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
        at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
        at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
        at dalvik.system.NativeStart.main(Native Method)

INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: test=main
INSTRUMENTATION_STATUS: class=com.dkxy.appsimulation.AppSimulationTestCase
INSTRUMENTATION_STATUS: stack=java.lang.NoClassDefFoundError: com.dkxy.appsimulationcommon.BaseSimulation
        at com.dkxy.appsimulation.AppSimulationTestCase.main(AppSimulationTestCase.java:22)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
        at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
        at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
        at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
        at dalvik.system.NativeStart.main(Native Method)

INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS_CODE: -1
INSTRUMENTATION_STATUS: stream=
Test results for WatcherResultPrinter=.E
Time: 0.053

FAILURES!!!
Tests run: 1,Failures: 0,Errors: 1


INSTRUMENTATION_STATUS_CODE: -1

比较奇葩的是,通过adb shell执行的命令没有任何的提示

C:Userswin10>adb shell "uiautomator runtest /data/local/tmp/appsimulation.jar -c com.dkxy.appsimulation.AppSimulationTestCase"
INSTRUMENTATION_STATUS: stream=
Test results for WatcherResultPrinter=
Time: 0.007

OK (0 tests)


INSTRUMENTATION_STATUS_CODE: -1



实际有效命令:

uiautomator runtest /data/local/tmp/appsimulation.jar /data/local/tmp/appsimulationcommon.jar -c com.dkxy.appsimulation.AppSimulationTestCase#main

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读