close

[Solved] Caused by: java.lang.NoSuchFieldException: $jacocoAccess

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run kotlin project But I am facing following error Caused by: java.lang.NoSuchFieldException: $jacocoAccess in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Caused by: java.lang.NoSuchFieldException: $jacocoAccess Error Occurs ?

I am trying to run kotlin project But I am facing following error.

Caused by: java.lang.NoSuchFieldException: $jacocoAccess

Caused by: java.lang.RuntimeException: Class java/lang/UnknownError could not be instrumented.

FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed

Task :test FAILED Exception in thread “main” java.lang.reflect.InvocationTargetException

How To Solve Caused by: java.lang.NoSuchFieldException: $jacocoAccess Error ?

  1. How To Solve Caused by: java.lang.NoSuchFieldException: $jacocoAccess Error ?

    To Solve Caused by: java.lang.NoSuchFieldException: $jacocoAccess Error Just add following line in build.gradle: jacoco { toolVersion = “0.8.6” } Now, your error must be solved. Second solution Just by setting Gradle JVM solved this issue: IntellijIDEA: File > Project Structure > Project Tab > SDK adopt-opendjdk-11 (in my case for Ubuntu).

  2. Caused by: java.lang.NoSuchFieldException: $jacocoAccess

    To Solve Caused by: java.lang.NoSuchFieldException: $jacocoAccess Error Just add following line in build.gradle: jacoco { toolVersion = “0.8.6” } Now, your error must be solved. Second solution Just by setting Gradle JVM solved this issue: IntellijIDEA: File > Project Structure > Project Tab > SDK adopt-opendjdk-11 (in my case for Ubuntu).

Solution 1: add following line in build.gradle

Just add following line in build.gradle.

jacoco {
    toolVersion = "0.8.6"
}

Now, your error must be solved.

Solution 2: set Gradle JVM

Just by setting Gradle JVM solved this issue.

IntellijIDEA: File > Project Structure > Project Tab > SDK adopt-opendjdk-11 (in my case for Ubuntu).

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment