简体   繁体   English

Gradle执行失败:未知的命令行选项'--daemon'

[英]Gradle execution fails: Unknown command-line option '--daemon'

I use latest Android Studio (0.8.2). 我使用最新的Android Studio(0.8.2)。 On my other PC the same code is successfully builded. 在我的另一台PC上,成功构建了相同的代码。

It means that build scripts are correct. 这意味着构建脚本是正确的。

So I assume that it is something with Gradle configuration, but I double rechecked all configs: 所以我假设它是Gradle配置的东西,但我重新检查所有配置:

  • I completely removed .gradle folder under C:\\Windows\\Users{MyUser}.gradle to delete old configurations; 我完全删除了C:\\ Windows \\ Users {MyUser} .gradle下的.gradle文件夹以删除旧配置;
  • gradle.properties file doesn`t have any uncommented options gradle.properties文件没有任何未注释的选项

在此输入图像描述

What do I miss? 我错过了什么?

NOTE! 注意! I have not specified '--daemon' option. 我没有指定'--daemon'选项。 Or I only think so:( I can`t find it in Gradle default and project specific settings 或者我只这么认为:(我无法在Gradle默认和项目特定设置中找到它

Also I created absolutely new project in the studio. 我也在工作室里创造了一个绝对新的项目。 It didn`t help - the same error( 它没有帮助 - 同样的错误(

The answer is very simple. 答案很简单。 It seems that new version of Android studio imported all setting from previous one. 似乎新版Android Studio导入了之前的所有设置。 Some of old options added additional options to compiler 一些旧选项为编译器添加了其他选项

问题的原因

Android Studio always uses a Gradle daemon. Android Studio始终使用Gradle守护程序。 It connects to the daemon via the Gradle Tooling API, and perhaps the latter doesn't understand --daemon (because it's redundant). 它通过Gradle Tooling API连接到守护进程,也许后者不理解--daemon (因为它是多余的)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM