为什么无法解决导入com.google.android.gms.plus的问题?

3

我正在尝试在我的应用中集成Google登录,但导入com.google.android.gms.plus时,会显示符号plus无法解析,为什么?是因为我使用的版本不对吗?

这是我的应用gradle:

apply plugin: 'com.android.application'


android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.example.hadi.do2get"
    minSdkVersion 14
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
 }

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.google.android.gms:play-services-auth:8.4.0'
}

apply plugin: 'com.google.gms.google-services'

这是我的项目 Gradle 文件:
buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
    classpath 'com.google.gms:google-services:2.0.0-alpha3'


 }
}

allprojects {
repositories {
    jcenter()
  }
}

task clean(type: Delete) {
delete rootProject.buildDir
}

我尝试过许多教程,但它们都不起作用。Google自己的教程也给我带来了错误。


你需要编译 'com.google.android.gms:play-services-plus:8.4.0' - Jared Burrows
我需要添加还是编辑? - hudhud
你需要添加Google Plus库。 - Jared Burrows
好的,谢谢,它起作用了 :) - hudhud
1个回答

7

尝试执行

'com.google.android.gms:play-services-plus:8.4.0'

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接