Could not find or load main class org.gradle.wrapper.GradleWrapperMain解决办法

解决办法:

gradlew is the gradle wrapper executable - batch script on windows and shell script elsewhere. If you include the following lines in your build.gradle,

task wrapper(type: Wrapper) {
    gradleVersion = ‘2.0‘
}

a gradle wrapper script is added to your source folders. The wrapper script when invoked, downloads the defined gradle version, and executes it. By distributing the wrapper with your project, anyone can work with it without needing to install Gradle beforehand. Even better, users of the build are guaranteed to use the version of Gradle that the build was designed to work with.

In your deletions, you deleted something that gradlew depends upon. You can either pull just the gradlew files from your source repo, or if you have gradle installed run gradle wrapper to restore it.

原文:http://stackoverflow.com/questions/29805622/could-not-find-or-load-main-class-org-gradle-wrapper-gradlewrappermain

时间: 2024-09-28 22:55:24

Could not find or load main class org.gradle.wrapper.GradleWrapperMain解决办法的相关文章

Failed to issue method call: Unit mysql.service failed to load: No such file or directory的解决办法

Failed to issue method call: Unit mysql.service failed to load: No such file or directory的解决办法 作者:chszs,转载需注明.博客主页:http://blog.csdn.net/chszs 1.软件环境: OpenSUSE 13.1 x64 MySQL 5.6.20 x64 2.采用RPM包安装MySQL 5.6.20 # rpm -ivh MySQL-server-5.6.20-1.sles11.x8

Error: Cannot open main configuration file '//start' for reading! 解决办法

当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading! 此问题是修改了nagios安装源文件导致的报错.如报此问题,请执行如下命令,便可解决: /usr/bin/install -c -m 755 -d -o root -g root /etc/rc.d/init.d /usr/bin/install -c -m 755 -o root -g roo

【SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".】解决办法

[问题描述] Maven工程中,使用了slf4j,运行时出现错误: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [

ant编译后用hadoop报Could not find or load main class

错误信息: [[email protected] HDFS_Java_API]$ hadoop HDFSJavaAPI.jar HDFSJavaAPIDemo Warning: $HADOOP_HOME is deprecated. Error: Could not find or load main class HDFSJavaAPI.jar 报错原因: 当前运行的 .class  文件不在 hadoop-env.sh文件中 解决办法: 在 hadoop-env.sh中配置HADOOP_CLA

cmd上执行java命令 - Could not find or load main class

成功的安装了JDK和Eclipse后,在开发测试Java工程中,很少会遇到开发环境问题. 这都归功于Eclise通过工程(project)和包(package)把这些管理好. 但偶尔在命令行下编译和运行Java文件时,还会遇到如下错误:(以下示例都是在Win7上进行)D:\temp> java Tmp 有时java源程序中package设置不当也会导致上述错误.1. 在java源文件开头没有包声明语句 package; D:\temp> javac Tmp.javaD:\temp> ja

Linux 下 Error: Could not find or load main class Hello

在linux下写了一个非常简单的Hello world程序,编译运行竟然报错:Error: Could not find or load main class Hello 最后发现是CLASSPATH的问题. 首先需要检查jdk环境变量是否配置正确:参考这篇文章:ubuntu12.04 安装配置jdk1.7 主要在环境变量这块: export JAVA_HOME=/usr/java/jdk1.8.0 export JRE_HOME=${JAVA_HOME}/jre export CLASSPAT

Could not find or load main class Hello

在 linux 下写了一个非常简单的 Hello World 程序,编译正常,运行报错:Error: Could not find or load main class Hello 这是由于 CLASSPATH 配置不当导致的,我们需要检查一下 CLASSPATH 后面是否有英文状态下的".:". 主要在环境变量这块: export JAVA_HOME=/usr/java/jdk1.8.0export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH

Error: Could not find or load main class Test

问题描述 Linux 环境下运行 Java 程序时,执行 javac Test.java 生成 Test.class 文件,再执行 java Test 时报错:Error: Could not find or load main class Test 解决方法 使用命令:vi /etc/profile 打开 /etc/profile 文件,键入 i 进行编辑: 修改 CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HO

Jib构建镜像的问题分析(Could not find or load main class ${start-class})

问题简述 通过Jib插件将SpringBoot工程制作成Docker镜像成功,但是运行镜像的时候报错(Could not find or load main class ${start-class}),今天来一起分析这个问题,希望能帮读者跳过小坑. 关于Jib插件 在Maven工程中可以使用Jib插件将当前Java工程构建成Docker镜像,详情请参考: <Docker与Jib(maven插件版)实战>; <Jib使用小结(Maven插件版)>; 环境信息 操作系统:macOS M