谷歌播放服务冲突错误

时间:2017-10-26 12:25:11

标签: android android-gradle google-play-services

在我的一个项目中获取谷歌播放服务错误。 Bellow是我的gradle文件并且收到错误 -

  

错误:任务':app:processDebugGoogleServices'的执行失败。   请修改版本冲突,方法是更新google-services插件的版本(https://bintray.com/android/android-tools/com.google.gms.google-services/提供有关最新版本的信息)或将com.google.android.gms版本更新为9.0.2。

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile project(':linkedin-sdk')
    compile 'com.android.support:design:25.3.1'
    compile 'com.zhy:flowlayout-lib:1.0.1'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile('com.google.android.gms:play-services-location:9.0.2')
            {
                force = true;
            }
    compile 'com.google.android.gms:play-services-plus:11.0.2'
    compile 'org.apache.httpcomponents:httpcore:4.4'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile 'android.lib.recaptcha:reCAPTCHA:+'
    compile 'com.facebook.android:facebook-android-sdk:4.0.0'
    compile 'com.google.android.gms:play-services-gcm:11.0.2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.opentok.android:opentok-android-sdk:2.11.1'
    compile('com.android.support:support-v4:25.3.1') {
        force = true;
    }
    compile 'com.splunk.mint:mint:5.0.0'
    compile('com.twitter.sdk.android:twitter:1.14.1@aar') {
        transitive = true;
    }
    compile files('libs/signpost-core-1.2.1.1.jar')
    compile 'org.twitter4j:twitter4j-core:4.0.4'
    compile 'com.github.nkzawa:socket.io-client:0.3.0'
    compile 'com.google.firebase:firebase-ads:11.0.2'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
    compile 'pub.devrel:easypermissions:0.4.0'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile files('libs/httpclient-4.5.1.jar')
    compile 'pl.bclogic:pulsator4droid:1.0.3'
    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'com.facebook.shimmer:shimmer:0.1.0@aar'
    compile 'jp.wasabeef:blurry:2.1.1'
    compile 'com.github.clans:fab:1.6.4'
    compile project(':emojilike')
    compile 'com.google.android.gms:play-services-base:11.0.2'
    compile 'com.google.android.gms:play-services-basement:11.0.2'
    compile 'com.google.android.gms:play-services-safetynet:11.0.2'
    compile 'com.google.android.gms:play-services-tasks:11.0.2'
}

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

我如何解决上述问题。请建议我

4 个答案:

答案 0 :(得分:1)

尝试更新 play-services-location

  

制作相同版本的Firebase或Google Play服务

使用此

compile('com.google.android.gms:play-services-location:11.0.2')

而不是

compile('com.google.android.gms:play-services-location:9.0.2') {
   force = true;
}

答案 1 :(得分:0)

compile('com.google.android.gms:play-services-location:9.0.2')更改为版本11.0.2

答案 2 :(得分:0)

只需更改您的总是应该添加相同版本的Google Play服务。

compile('com.google.android.gms:play-services-location:9.0.2')
{
.....
}

compile('com.google.android.gms:play-services-location:11.0.2')
{
.......
}

答案 3 :(得分:0)

您需要使用相同版本的 Firebase / Google Play服务。您正在使用以下内容:

compile('com.google.android.gms:play-services-location:9.0.2') {
   force = true;
}

compile 'com.google.android.gms:play-services-base:11.0.2'
compile 'com.google.android.gms:play-services-basement:11.0.2'
compile 'com.google.android.gms:play-services-safetynet:11.0.2'
compile 'com.google.android.gms:play-services-tasks:11.0.2'

有不同的版本。将其更改为11.0.2的相同版本。然后移除force = true,因为您可能不需要它:

compile 'com.google.android.gms:play-services-location:9.0.2'