Monday, June 29, 2015

Caused by: java.lang.NoSuchFieldException: $jacocoAccess

When you run the following command:

gradle clean test

you might get the following exception:

Caused by: java.lang.NoSuchFieldException: $jacocoAccess

JaCoCo default version (0.6.2.201302030002) doesn't work with Java 8.

You can check your JaCoCo version with the following configuration:

    jacoco {
        println toolVersion
    }

and you will get the following output:

0.6.2.201302030002

You can fix with the following configuration:

    jacoco {
        toolVersion = "0.7.1.201405082137"
    }

Reference:
https://github.com/jacoco/jacoco/issues/74

1 comment:

  1. Helped me, thanks.

    I'm amused by your blog, because I think you are using blogger the same way I am: as a dump for documenting the little problems we encounter so we don't forget the next time we run into them.

    I'm subscribed to you -- I'll chip in if there's anything I'm knowledgeable about!

    http://dwemerchopshop.blogspot.com/

    ReplyDelete