Android studio 3.0 received SHA-256 error error for org / jacoco / agent / rt / RT.class

After I upgraded Android studio to 3.0 and migrated my project following this instruction

I got an error like this:

* What went wrong: Execution failed for task ':app:transformClassesWithFirebasePerformancePluginForDevDebug'. > SHA-256 digest error for org/jacoco/agent/rt/RT.class 

I tracked and found that the main reason came from this code in the build.gradle file.

 debug { ... // Run code coverage reports by default on debug builds. testCoverageEnabled = true } 

Because when I commented on this line of code, the project was built perfectly. I do not have this problem when I used Android Studio 2.3.

I searched for some related topics and found that someone said that disabling instant start would be solved, but, unfortunately, does not work for my case.

Does anyone have a suggestion to solve this problem?

thanks

+5
source share
1 answer

UPDATE 2 :

Firebase support still says the fix is ​​not complete, but I tried it today with the latest versions of firebase-perf and jacoco and it works.

UPDATE 1 :

firebase-perf does not work with jacoco when supporting Java 1.8 . The Firebase support team was able to replicate and explore.

Original post :

This is similar to triggering when the firebase-perf plugin is firebase-perf . I filed an error with the Firebase team and am updated if I get a response.

As a temporary workaround, just commenting on apply plugin ... firebase-perf should help. It will disable Auto @AddTrace , but @AddTrace and newTrace should still work.

In my case, testCoverageEnabled set conditionally based on the project property, and I don't need the firebase-perf plugin to evaluate coverage, so I just disabled the plugin:

 if (!project.hasProperty('coverageRun')) { apply plugin: 'com.google.firebase.firebase-perf' } // < ... > if (project.hasProperty('coverageRun')) { testCoverageEnabled true } 
+4
source

Source: https://habr.com/ru/post/1273019/


All Articles