欢迎来到 Android人的问与答 ,在这里提问或帮助他人解答。 Question2Answer的1.6.x和1.7.x版本的中文翻译包我修改更新:

Question2answer

如何使用中文语言包

Q2A 1.6.x - Chinese Simplified (简体中文)

Q2A 1.7.x - Chinese Simplified (简体中文)


国内服务器推荐 阿里云服务器
国外服务器推荐 DigitalOcean
VPN推荐 正版Green VPN
阿里云推荐码:ldvq50

Cannot run program “gradle” in Jenkins

0 喜欢 0 不喜欢
413 浏览

持续集成时,刚配置为,新建job以后,运行遇到类似下面的错误:

[workspace] $ gradle clean -b build/build.gradle

FATAL: command execution failed

java.io.IOException: Cannot run program "gradle" (in directory "/Users/Shared/Jenkins/Home/jobs/test/workspace"): error=2, No such file or directory

    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)

    at hudson.Proc$LocalProc.<init>(Proc.java:244)

    at hudson.Proc$LocalProc.<init>(Proc.java:216)

    at hudson.Launcher$LocalLauncher.launch(Launcher.java:707)

    at hudson.Launcher$ProcStarter.start(Launcher.java:338)

    at hudson.Launcher$ProcStarter.join(Launcher.java:345)

    at hudson.plugins.gradle.Gradle.performTask(Gradle.java:201)

    at hudson.plugins.gradle.Gradle.perform(Gradle.java:97)

    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)

    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:695)

    at hudson.model.Build$RunnerImpl.build(Build.java:178)

    at hudson.model.Build$RunnerImpl.doRun(Build.java:139)

    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:465)

    at hudson.model.Run.run(Run.java:1404)

    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)

    at hudson.model.ResourceController.execute(ResourceController.java:88)

    at hudson.model.Executor.run(Executor.java:238)

Caused by: java.io.IOException: error=2, No such file or directory

    at java.lang.UNIXProcess.forkAndExec(Native Method)

    at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)

    at java.lang.ProcessImpl.start(ProcessImpl.java:91)

    at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)

    ... 16 more

Build step 'Invoke Gradle script' changed build result to FAILURE

Build step 'Invoke Gradle script' marked build as failure

Finished: FAILURE

 

解决:

这个gradle的配置不对。进入项目的详情页,点击设置,找到“构建”那里的Invoke Gradle script,设置为:Use Gradle Wrapper,然后task里输入build。最后保存。

最新提问 7月 21, 2016 分类:Jenkins | 用户: forlong401 (7,050 分)

登录 或者 注册 后回答这个问题。

...