java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_14f7ee5/Offline

后端 未结 3 1592
情歌与酒
情歌与酒 2021-02-13 19:07

I\'m seeing the following error in my Android project after updating to Gradle Build Tools 2.1.3 and Gradle 2.14.1. It happens immediately when I run the application. How do I f

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-13 19:50

    There was a bug report filed: https://code.google.com/p/android/issues/detail?id=220640

    This looks to be a problem with jacoco versions. You'll need to update your jacocoversion to 0.7.6.201602180812.

    To quote from the issue:

    The jacoco plugin version was bumped from 0.7.4.201502262128 to 0.7.6.201602180812 between 2.1.2 to 2.1.3 which is the likely cause of this issue.

    In 2.2 it is 0.7.5.201505241946.

    It also looks like one possible error might be related to Google Play Services. There are temporary workarounds for the time being.

    Option 1: Comment out testCoverageEnabled true.

    buildTypes {
        debug {
            // testCoverageEnabled true
        }
    }
    

    Option 2: Using Instant Run also seems to solve this problem.

提交回复
热议问题