我正在尝试使用gradle构建我的Android Studio项目。我添加了一个编译规则如下:
compile 'com.google.android.gms:play-services:6.5.87'
但是它会出现以下错误:
Error:Module version com.google.android.gms:play-services:6.5.87 depends on libraries but is not a library itself
我已尝试更改版本并排除support-v4模块,如下所述:
Crouton depends on libraries but is not a library itself
但我无法解决错误。 任何帮助,将不胜感激。
编辑:这是我的build.gradle文件中的依赖项列表:
dependencies {
// compile project(':library')
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.android.support:recyclerview-v7:21.0.2'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile('org.apache.httpcomponents:httpmime:4.3.5') {
exclude module: 'org.apache.httpcomponents:httpclient'
}
}