摇篮:失败:无法确定要执行哪些任务 [英] Gradle: FAILURE: Could not determine which tasks to execute

查看:261
本文介绍了摇篮:失败:无法确定要执行哪些任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到Android 0.2.0工作室,并得到了以下错误。错误得到了应用建议的解决方案后解决,但现在下面的错误出现。

Upgraded to Android Studio 0.2.0 and got the following error. The error got resolved after applying suggested solution but now the following error appeared.

Gradle: 
FAILURE: Could not determine which tasks to execute.
* What went wrong:
Task 'assemble' not found in root project 'MerlinCheckProject'.
* Try:
Run gradle tasks to get a list of available tasks.

我不知道错误是如何解决这个问题。鸭preciate帮助。

I have no clue what the error is how to solve it. Appreciate help.

推荐答案

删除<成分名称=FacetManager> ...< /成分> IML 文件

http://tool​​s.android.com/knownissues

From http://tools.android.com/knownissues:

如果您收到以下错误信息:

If you get the following error message:

摇篮:   失败:无法确定要执行的任务

Gradle: FAILURE: Could not determine which tasks to execute.

      
  • 出了什么问题:   任务'组装'的根项目未找到MyProject的。

  • What went wrong: Task 'assemble' not found in root project 'MyProject'.

尝试:   运行摇篮任务来获取可用的任务列表。

Try: Run gradle tasks to get a list of available tasks.

真正的问题是Android的工作室是previous版本配置错误(如 MyProject.iml )的IDEA文件 - 它增加了一个额外的<成分名称=FacetManager> 这不应该是present XML元素。在上述情况下,解决的办法是修改 MyProject.iml 和删除<成分名称=FacetManager> 部分,如下所示:

The real problem is that previous version of Android Studio misconfigured the IDEA file (e.g. MyProject.iml) -- it added an extra <component name="FacetManager"> XML element that shouldn't be present. In the case above, the solution is to edit MyProject.iml and to remove the <component name="FacetManager"> part as shown here:

<?xml version="1.0" encoding="UTF-8"?>
<module external.system.id="GRADLE" type="JAVA_MODULE" version="4">
  <component name="FacetManager">
    ...remove this element and everything inside such as <facet> elements...
  </component>
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    ...keep this part...
  </component>
</module>

另外,您可以删除该项目的 .idea 文件夹和 IML 文件并重新导入你的源代码到一个新的Android的Studio项目。

Alternatively you could remove the project's .idea folder and iml files and re-import your sources into a new Android Studio project.

在接下来的版本中,我们将解决这个问题 - 会出现一个解决这个问题按钮执行自动为您修复

In the next release we'll fix this -- there will be a "fix this" button to do that fix automatically for you.

这篇关于摇篮:失败:无法确定要执行哪些任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆