Travis CI Could not find or load main class org.gradle.wrapper.GradleWrapperMain 错误

问题

在 Travis CI 编译的时候出现

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

错误。

详细的错误日志为:

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
The command "eval ./gradlew assemble " failed. Retrying, 2 of 3.
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
The command "eval ./gradlew assemble " failed. Retrying, 3 of 3.
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
The command "eval ./gradlew assemble " failed 3 times.
The command "./gradlew assemble" failed and exited with 1 during .
Your build has been stopped.

 

解决方法

看看你提交的代码中 gradle 文件夹有没有提交上去。

如果没有提交这个文件夹的话,需要将源代码中的 gradle 提交到代码库上。

posted @   huyuchengus  阅读(1080)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
历史上的今天:
2018-07-14 Confluence 6 虚拟文件和文件夹
2018-07-14 Confluence 6 WebDAV 禁用严格路径检查
点击右上角即可分享
微信分享提示