Error: could not find or load the main class org.gradle.wrapper.GradleWrapperMain

My build.gradle for Android application has become quite lengthy. Changed this plugin called gradle-lint-plugin and configured it correctly. Its documentation says:

Run ./gradlew fixGradleLintto automatically fix build scripts

but at startup I get Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain.

Does this have anything to do with Android Studio using the native Gradle plugin? I do not have Gradle installed on the system.

Edit : I don't want to install Gradle on a system scale - is there a way to do this only in Android Studio?

+5
source share
1 answer

The wrapper seems to be configured incorrectly. There is probably no ATM wrapper.

$ ls gradle/wrapper
gradle-wrapper.jar        gradle-wrapper.properties

When you look in gradle/wrapper, do you see gradle-wrapper.jar?

if you install gradle, you can generate the jar with this command: $ gradle wrapper

+10
source

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


All Articles