Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
安装Android Studio的支持存储库_Android_Linux_Android Studio - Fatal编程技术网

安装Android Studio的支持存储库

安装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

我在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 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文件中。将它放在模块的构建文件中,而不是顶级构建文件