When i run my android UIAutomator code, it shows error

前端 未结 4 1297
情话喂你
情话喂你 2021-02-19 13:22

When I run my android UIAutomator code, it shows following error.

INSTRUMENTATION_RESULT: shortMsg=java.lang.RuntimeException
INSTRUMENTATION_RESULT

4条回答
  •  野的像风
    2021-02-19 13:41

    If you get a ClassNotFindException while running your uiautomator tests :

    Some of us my get this error because their ROM puts the folder /data/dalvik-cache in read-only mode. That happened to me with Cyanogen for a S3.

    In that case type, in bash :

    adb shell 
    su
    chmod 777 /data/dalvik-cache
    exit
    

    rerun your tests and that should work. As dalvik-cache is locked for apps, uiautomator can't ask dalvik to unzip the jar of your tests and dalvik won't find the its classes.

提交回复
热议问题