集成Google登录

时间:2018-11-06 16:08:19

标签: android google-play-services google-signin googlesigninapi

我正在尝试将google登录功能集成到我的应用程序中,我已经按照文档中的所有步骤进行操作,但是当我试图在设备上运行该应用程序时,它显示“无法解决:播放-服务基础”

这是我的应用等级:

apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.example.user.uberclone"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
    "android.support.test.runner.AndroidJUnitRunner"
    }
buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'
}

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

这是我的最高级别:

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.0.1'
    }
}
allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {url "https://maven.google.com"}
    }
}

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

0 个答案:

没有答案