Good morning,
I try to add the compile 'com.android.support:design:22.2.0' library to my program:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
compile 'com.android.support:design:22.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
And it gives me an error that tells me to install Android Support Repository
Error: Could not find method compile () for arguments [com.android.support:design:22.2.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager. Open Android SDK Manager
The problem is that I already have it installed and I do not understand why it does not detect it.
Greetings, thank you.
Edit2:
After being a bit fiddling I think I've already found the solution, and that is that my project has 2 files build.gradle : build.gradle (MyApplication) and < em> build.gradle (app) . I added the library to the latter and it does not give any errors. Thank you all for your help.