Remove <component name="FacetManager"> ... </component>
from your iml
file.
From http://tools.android.com/knownissues:
If you get the following error message:
Gradle:
FAILURE: Could not determine which tasks to execute.
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>
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…