For me, the problem was that I had set Gradle 1.12 in "Settings..>Gradle" as local gradle distribution, however the project was created by a team mate using gradle 2.2.1
I downloaded gradle 2.2.1 manually and set it as local distribution and problem was solved.