错误:无法找到或加载主类org.gradle.wrapper.GradleWrapperMain [英] Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
问题描述
运行
./ gradlew fixGradleLint
自动修复您的构建脚本
但运行后得到错误:无法找到或加载主类org.gradle.wrapper .GradleWrapperMain
。
这与Android Studio使用自己的Gradle插件有什么关系?我没有在系统中安装Gradle。
编辑:我不希望在系统范围内安装Gradle - 有没有办法在Android中执行此操作Studio only?
听起来像包装设置不正确。
$ ls gradle / wrapper
gradle-wrapper.jar gradle-wrapper.properties
当您查看 gradle / wrapper
时,您会请参阅 gradle-wrapper.jar
?
如果您安装了gradle,您可以使用以下命令生成jar:
$ gradle wrapper
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
这篇关于错误:无法找到或加载主类org.gradle.wrapper.GradleWrapperMain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!