Android Studio 0.4.3 – Task ‘assemble’ not found in root project

Quick Answer

Remove everything betweeen and including the component tag

<component name="FacetManager"> 
   ... <!-- remove all in this node 
</component>` 

Long Answer

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

If you get the following error message:

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

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 entire node <component name="FacetManager"> ... </component>

In the case of your specific project called XXX, you would be looking to correct the file called XXX.iml

The documentation also says to “Alternatively you could remove the project’s .idea folder and iml files and re-import your sources into a new Android Studio project.” Not that this solution will work for you since you can’t even get a new project to build.

Leave a Comment