Hi, 

the problem is here that the correct JaCoCo runtime (provided by
jacocoagent.jar) cannot be found: 

01-30 01:07:48.355  2831  2831 E AndroidRuntime: Caused by:
java.lang.ClassNotFoundException: DIDN'T FIND CLASS
"ORG.JACOCO.AGENT.RT.INTERNAL_290345E.OFFLINE" on path: DexPathList[[zip
file
"/data/app/com.tsinghua.date.sample-O4Rk5hb51sr4_D96mT2MnQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.tsinghua.date.sample-O4Rk5hb51sr4_D96mT2MnQ==/lib/arm,
/system/lib, /vendor/lib]] 

Please include jacocoagent.jar in you application class path. 

Important: The jacocoagent.jar file must be from the exact same release
than the JaCoCo version used for offline instrumentation. In your case
0.8.0. 

Regards,
-marc 

On 2018-01-30 10:18, Tool Ply wrote:

> Yes, as the following: 
> 
> Ply Truth, [30.01.18 17:11] 
> 01-30 01:07:48.058  1360  1650 D EGL_emulation: eglMakeCurrent: 0x8d8bf4c0: 
> ver 2 0 (tinfo 0x8d8b7ac0) 
> 01-30 01:07:48.344  2831  2831 D AndroidRuntime: Shutting down VM 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime: FATAL EXCEPTION: main 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime: Process: 
> com.tsinghua.date.sample, PID: 2831 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime: 
> java.lang.NoClassDefFoundError: Failed resolution of: 
> Lorg/jacoco/agent/rt/internal_290345e/Offline; 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> com.tsinghua.date.sample.SettingsActivity.$jacocoInit(Unknown Source:13) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> com.tsinghua.date.sample.SettingsActivity.<clinit😠Unknown Source:0) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> java.lang.Class.newInstance(Native Method) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.app.Instrumentation.newActivity(Instrumentation.java:1174) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.app.ActivityThread.access$1300(ActivityThread.java:176) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.os.Handler.dispatchMessage(Handler.java:106) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.os.Looper.loop(Looper.java:164) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> android.app.ActivityThread.main(ActivityThread.java:6494) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> java.lang.reflect.Method.invoke(Native Method) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
>  
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:816) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime: Caused by: 
> java.lang.ClassNotFoundException: Didn't find class 
> "org.jacoco.agent.rt.internal_290345e.Offline" on path: DexPathList[[zip file 
> "/data/app/com.tsinghua.date.sample-O4Rk5hb51sr4_D96mT2MnQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.tsinghua.date.sample-O4Rk5hb51sr4_D96mT2MnQ==/lib/arm,
>  /system/lib, /vendor/lib]] 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:379) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:312) 
> 01-30 01:07:48.355  2831  2831 E AndroidRuntime:   ... 14 more 
> 01-30 01:07:48.382  1180  1674 W ActivityManager:   Force finishing activity 
> com.tsinghua.date.sample/.SettingsActivity 
> 
> 2018-01-30 0:51 GMT+08:00 Marc Hoffmann <[email protected]>:
> 
>> the apk instrumented by Jacoco could not start up 
> 
> Is there any error message? 
> 
> Regards,
> -marc
> 
> On 2018-01-29 14:14, Tool Ply wrote: 
> Just like the title. 
> 
> I decompiled the apk and use ASM and Jacoco to instrument it jar separately. 
> The result shows that ASM work well. However, the apk instrumented by Jacoco 
> could not start up and I did not find any .exec files by command `find . 
> -name jacoco` 
> 
> In order to verificate if it was caused by file read and write errors, I have 
> tried to config 'output=none' in jacoco-agent.properties in the Dalvik and 
> added the path to classpath. It does not work. 
> 
> How to fix it? 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/ee34d583-c01c-4340-809b-2a6d43faf23d%40googlegroups.com
>  [1].
> For more options, visit https://groups.google.com/d/optout [2]. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected]. To view this discussion on the 
> web visit 
> https://groups.google.com/d/msgid/jacoco/908fd65bd2a56db22477265e6a525716%40mountainminds.com
>  [3]. 
> 
> For more options, visit https://groups.google.com/d/optout [2].

  -- 
You received this message because you are subscribed to the Google
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/CAEqeQ9Gn7QQMEfJguH557ZC19g19frYXWJPd_t7jgz2%2BVjur1Q%40mail.gmail.com
[4].
For more options, visit https://groups.google.com/d/optout. 

  

Links:
------
[1]
https://groups.google.com/d/msgid/jacoco/ee34d583-c01c-4340-809b-2a6d43faf23d%40googlegroups.com?utm_medium=email&amp;utm_source=footer
[2] https://groups.google.com/d/optout
[3]
https://groups.google.com/d/msgid/jacoco/908fd65bd2a56db22477265e6a525716%40mountainminds.com?utm_medium=email&amp;utm_source=footer
[4]
https://groups.google.com/d/msgid/jacoco/CAEqeQ9Gn7QQMEfJguH557ZC19g19frYXWJPd_t7jgz2%2BVjur1Q%40mail.gmail.com?utm_medium=email&amp;utm_source=footer

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/aa3e580353d48401c4090e3d921eedd9%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to