I am trying to build android application. Use this .apk to consume for Azure CI-CD for distribution & mobile automation. While executing command ./gradlew clean or ./gradlew assembleRelease facing below error :

java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

Please let me know if anyone face/fix this issue.

1 Answer 1


Verify which gradle version installed on your machine and make changes in my gradle-wrapper.properties file to


Note - for me gradle 6.2 works perfectly considering my project. May vary in your case.

Then I found - Java version is not supporting to all versions. Java 16 will not support


  • Try to install Java 8 or Java 11 version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.