解决Jococo代码覆盖率 安装包后,执行指令闪退

网上找了半天,未找到结果,

运行该程序 adb shell am instrument -e coverage true -w  包名/.test.JacocoInstrumentation 

报如下错误

INSTRUMENTATION_RESULT: longMsg=java.lang.ClassNotFoundException: Didn't find class "com.goertek.gobubble.test.JacocoInstrumentation" on

path: DexPathList[[zip file "/data/app/com.goertek.gobubble-1/base.apk", zip file "/data/app/com.goertek.gobubble-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

解决过程 

  相关的三个覆盖率用到的文件 包名设置不对引起   InstrumentedActivity  FinishListener  JacocoInstrumentation

  将文件第一个行  package 包名.test;    具体根据实际情况设置 

猜你喜欢

转载自blog.csdn.net/roxxo/article/details/77650863