mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this, onConnectionFailedListener)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.addApi(Plus.API, null)
.build();
我错过了什么?我无法弄清楚应该添加什么依赖项。 请帮忙。 AndroidStudio 无法解析 PLUS.API 这是我的 gradle 文件:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "in.co.palup.android"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenLocal()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile "com.android.support:support-v4:23.1.1"
compile "com.android.support:support-v13:23.1.1"
compile "com.android.support:cardview-v7:23.1.1"
compile 'com.android.support:support-v4:23.1.1'
compile 'com.google.code.gson:gson:2.4'
compile 'joda-time:joda-time:2.9'
compile "palup:common:0.1"
compile 'com.google.android.gms:play-services-appindexing:8.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
}
我错过了什么?我无法弄清楚我应该使用什么依赖项。 请帮忙。
最佳答案
你的 gradle 依赖项会不会丢失
com.google.android.gms:play-services-plus:8.3.0
关于android - 在 android Activity 中使用 PLUS.API 的依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34113249/