如何实施Google Play服务以获得成就?

时间:2018-08-02 18:04:31

标签: android-studio dependencies google-play-services

我正在android studio中制作一个应用,我需要在gradle模块中添加Google Play服务依赖项。现在,我尝试像这样手动添加它:


implementation 'com.google.android.gms:play-services-identity:15.0.1'


我也通过模块管理器尝试过。现在我需要添加哪些确切的播放服务(即分析),而不是添加用于使用成就的捆绑包(播放服务)?


添加我的Play服务后,就会出现以下错误:


All com.android.support libraries must use the exact same version specification


从文档中我看不出什么更好的。

这是我的礼物:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.bnf.xpclicker"
        minSdkVersion 24
        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 fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso core:3.0.2'
    ***implementation 'com.google.android.gms:play-services-identity:15.0.1'***
}

0 个答案:

没有答案
相关问题