Reputation: 43
I'm using Android Studio on Arch Linux and I installed the Support Repository using the SKD Manager. However whenever I try to use it I get an error saying:
Error:Could not find method compile() for arguments [com.android.support:appcompat-v7:19.1.0] on root project 'Aaaa'.
Please install the Android Support Repository from the Android SDK Manager.
I tried appcompat v7, support v4 and support v13 (I checked all of them are installed). I tried running as root and I still get the same error. The path in local.properties is pointing to the right directory. I'm no really sure what else I should change.
I created a blank activity just to try and use this repository, here is the build.gradle file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
compile 'com.android.support:appcompat-v7:19.1.0'
}
Upvotes: 0
Views: 1307
Reputation: 80020
You've put your dependencies
block in the wrong build.gradle file. Instead of the top-level build file, put it in your module's build file instead.
Upvotes: 2