安装Android Studio的支持存储库
我在ArchLinux上使用Android Studio,并使用SKD管理器安装了支持存储库。但是,每当我尝试使用它时,我都会收到一个错误,即:安装Android Studio的支持存储库,android,linux,android-studio,Android,Linux,Android Studio,我在ArchLinux上使用Android Studio,并使用SKD管理器安装了支持存储库。但是,每当我尝试使用它时,我都会收到一个错误,即: 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 And
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.
我尝试了appcompat v7、support v4和support v13(我检查了它们是否都已安装)。我尝试以root用户身份运行,但仍然出现相同的错误。local.properties中的路径指向正确的目录。我真的不确定我还应该改变什么
我创建了一个空白活动只是为了尝试使用此存储库,下面是build.gradle文件:
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'
}
您已将
依赖项块放在错误的build.gradle文件中。将它放在模块的构建文件中,而不是顶级构建文件