【发布时间】:2015-06-15 08:26:41
【问题描述】:
我在 Centos 7 终端中使用了 gradle build 命令并得到了输出:
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type InitScriptHandler using BuildScopeServices.createInitScriptHandler().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
【问题讨论】:
-
您是否有适当的权限来运行该命令?
-
我认为你是对的,问题出在权限上,因为在 root 用户中 gradle 工作正常,我尝试使用命令 chmod -R 777 ./gradle-2.4 将 777 权限设置为 gradle 文件夹,但错误仍然存在发生。我在用户主目录中解压缩的 Gradle 文件夹,我收到上述错误。
-
在我输入的命令前面插入
sudo修复了这个问题。在这方面,错误消息可能会更有帮助。 -
在我杀死 gradle daemon 时为我工作。
标签: gradle