【发布时间】:2015-03-19 09:37:17
【问题描述】:
我的 Android 项目有问题。由于此错误,无法构建它:错误:找不到符号类 LocationClient。我已经知道您需要使用较低版本的 google play 服务,例如“com.google.android.gms:play-services:5.+”。
但是当我使用那个时,我得到另一个错误:错误:属性“主题”已经被定义。当我用谷歌搜索它时,它说我需要使用更高版本的谷歌播放服务,比如“com.google.android.gms:play-services:6.+”。
所以我需要同时使用 5.+ 和 6.+ 版本,但这是不可能的。这个问题有解决办法吗?
这是我的 gradle 脚本:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "app_id"
minSdkVersion 19
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
//tried different versions of the librarys, without success
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.google.android.gms:play-services:5.+'
}
【问题讨论】: