Q:

gradle project sync failed android studio

I'm trying to setup nhaarman/ListViewAnimations inside of Android Studio 1.1.0.
From Setup:
Add the following to your build.gradle:
repositories {
    mavenCentral()
}

dependencies {
    compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
    compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar'
    compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
}

yet Android Studio says:

Gradle project sync failed. Basic functionality (e.g. editing,
  debugging) will not work properly.

Error:(26, 0) Gradle DSL method not found: 'compile()'
Possible causes:<ul><li>The project 'X' may be using a version of Gradle that does not contain the method.
<a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>

A:

After adding those lines to:
build.gradle (Module: app)
instead of
build.gradle (Project: app)
the error is gone.

