Could not find class GradleWrapperMain
If you have a Gradle project like an Android app and want to do CI(Continuous integration) with any CI platforms like Jenkins, Gitlab CI etc, then most of the time script work smoothly but sometimes it drives you like nuts. One of the common problem is –
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Running after script... End CI ERROR: Build failed: exit status 1
And the solution of this error is your project either doesn’t have gradle-wrapper.jar or you have missed it to add to you version control system tools like Git, Mercurial. Make sure you add the following files and directory into your project and into your version control system.
|---gradle |---wrapper |---gradle-wrapper.jar |---gradle-wrapper.properties
And you are done.
Do not forget to share it with your friends and colleagues.