My build.gradle for an Android app has become quite lengthy. Chanced upon this plugin called gradle-lint-plugin and configured it properly. In its documentation it says
Run
./gradlew fixGradleLint
to automatically fix your build scripts
but upon running that I get Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
.
Does this have anything to do with the Android Studio using its own Gradle plugin? I do not have Gradle installed systemwide.
Edit: I do not wish to install Gradle systemwide - is there any way to do this within Android Studio only?
Sounds like the wrapper is not setup correctly. Likely missing the wrapper jar.
$ 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
I was having this error and I solved it correcting the path which had special caracters.
Ex: .../T&G/appmobile to ../TG/appmobile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With