I can not find the origin of this error when I compile in release mode. I have the impression that this error appeared without modifying my code (I try to go back with github bu
I had the same error, because my buildSrc directory contained the fork of gradle android junit jacoco plugin. Once I got rid of it (actually I replaced source code fork by dependency on original plugin), error'd gone. If none of above advice helps you, try to check your buildSrc directory.