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.
I have no clue what the error is how to solve it. Appreciate help.
Inspired by the answer from @Dhafer.Dhib to check the installed gradle version, I want to add: The recommended way to install gradle under linux is using sdk, see https://gradle.org, I did the following steps:
The solution works fine. If you're having issues with it, ensure you close Android Studio completely, then edit the file, then reopen it.
Remove
<component name="FacetManager"> ... </component>
from youriml
file.From http://tools.android.com/knownissues:
If you get the following error message:
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 editMyProject.iml
and to remove the<component name="FacetManager">
part as shown here:Alternatively you could remove the project's
.idea
folder andiml
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.
In my case, in a cordova project, I had an old gradle version 1.4 and that was the problem. So try to remove gradle
then, download new binary relase of gradle from here . I got v3.5.1. Finally, Create a directory for the Gradle installation.
Extract the downloaded archive to the newly created directory.
Configure the PATH environment variable so that the gradle executable can be directly executed anywhere on the system.
You can run the following command to check if the Gradle install was successful.
Deleting the facet-manager component from IML file did not solve the problem for me. I got the same error and closing and reopening the project caused the facet-manager component to be recreated in the iml file.
I had to delete the .idea directory and the .iml file and then import the top level gradle.build file to solve the problem. I was able to import the project in place using the import option on the initial Android Studio menu (with no project open).
I am a Windows user. The solution that worked for me was to remove the previous version of Android Studio:
http://developer.android.com/sdk/installing/studio.html#Updating