On Tuesday, January 30, 2018 at 10:59:12 AM UTC+1, Tool Ply wrote:
>
> I tried the Missing Jacoco Components Jar 
> <https://github.com/uriel-frankel/android-code-coverage/raw/master/hellojacoco/android-jacoco-the-missing.jar>
>  in 
> this questions java.lang.NoClassDefFoundError: Failed resolution of: 
> Lorg/jacoco/agent/rt/internal_14f7ee5/Offline 
> <https://www.google.com/url?q=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F39195754%2Fjava-lang-noclassdeffounderror-failed-resolution-of-lorg-jacoco-agent-rt-inter&sa=D&sntz=1&usg=AFQjCNFosuD331V9DGNjq0XNG7-4TcUiSA>
>


As Marc said : you should not use some random JAR from internet, but 
jacocoagent.jar that is part of JaCoCo distribution 
( http://www.jacoco.org/jacoco/ ) of a version that you use for offline 
instrumentation. In your case this is 0.8.0, so you'll find jacocoagent.jar 
in folder "lib" of 
http://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.0/jacoco-0.8.0.zip

Alternatively exactly the same JAR can be obtained from Maven Central 
repository - as described on page 
http://www.jacoco.org/jacoco/trunk/doc/repo.html it has groupId 
"org.jacoco" artifactId "org.jacoco.agent" classifier "runtime" and version 
0.8.0, 
so 
http://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.0/org.jacoco.agent-0.8.0-runtime.jar

Of course placing it in classpath won't be enough - it should be loadable 
by Android VM as like instrumented application, so should be translated to 
Dalvik bytecode.

-- 
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/196bda46-cf21-4cc2-a8a7-6d8d9553a6b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to