简体   繁体   English

通过更新google-services插件的版本来解决版本冲突

[英]fix the version conflict either by updating the version of the google-services plugin

I am using Google's Firebase (For notification) and Places (For address and location) API in my project. 我在项目中使用Google的Firebase(用于通知)和Places(用于地址和位置)API。 Latest version of both are 16.0.6 and 16.0.0 respectively that I am using in app. 我在应用程序中使用的最新版本均为16.0.6和16.0.0。

When integrating either api, app is working fine. 集成任何一个api时,app都可以正常工作。 But on integrating together it gives below error: 但是在集成在一起时会出现以下错误:

Execution failed for task ':app:processDebugGoogleServices'. 任务':app:processDebugGoogleServices'执行失败。

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/ ) or updating the version of com.google.android.gms to 16.0.6. 请通过更新google-services插件的版本来解决版本冲突(有关最新版本的信息, 访问https://bintray.com/android/android-tools/com.google.gms.google-services/ )或将com.google.android.gms的版本更新为16.0.6。

I checked other posts too, but they are old now and not helping me. 我也检查了其他帖子,但是它们现在已经很旧了,无法帮助我。

Below is my app module's build.gradle 下面是我的应用程序模块的build.gradle

apply plugin: 'com.android.application'

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
        maven {
            url "https://maven.google.com"
        }

    }
    dependencies {
        // replace with the current version of the Android plugin
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:3.1.1'
    }
}

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "abc.xyz"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true

        // add below section
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
            }
        }
    }
    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
            signingConfig signingConfigs.Release
            zipAlignEnabled true
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable false
            signingConfig signingConfigs.Release
            zipAlignEnabled true
        }
    }
}

repositories {
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

configurations {
    all*.exclude group: 'com.android.support', module: 'support-v13'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'

    //LinkedIn SDK
    implementation project(':linkedin-sdk')
    implementation 'com.github.bumptech.glide:glide:3.8.0'
    implementation 'com.ethanhua:skeleton:1.1.2'
    implementation 'io.supercharge:shimmerlayout:2.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.34.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    implementation 'org.androidannotations:androidannotations-api:4.3.1'

    <!-- Google apis -->
    implementation 'com.google.firebase:firebase-core:16.0.6'
    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.google.android.gms:play-services-places:16.0.0'

    annotationProcessor 'org.androidannotations:androidannotations:4.3.1'
}

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

Is there any otherway I can work with both? 我还有其他办法可以同时使用吗?

I could not figure out what is wrong here. 我不知道这里出了什么问题。 But i tried downgrading version number to 12.0.1 of both libraries and it worked fine. 但是我尝试将两个库的版本号降级到12.0.1,并且运行良好。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决“请通过更新google-services插件的版本来解决版本冲突” - How to fix “Please fix the version conflict either by updating the version of the google-services plugin” 请通过更新google-services插件的版本来解决版本冲突? - Please fix the version conflict either by updating the version of the google-services plugin? 无法通过更新google-services插件的版本来解决版本冲突 - Can not fix version conflict either by updating the version of the google-services plugin 错误:请通过更新 google-services 插件的版本来解决版本冲突 - Error : Please fix the version conflict either by updating the version of the google-services plugin 请通过更新google-services插件或updati的版本来修复版本冲突 - Please fix the version conflict either by updating the version of the google-services plugin or updati 请通过更新google-services插件的版本来解决版本冲突 - Please fix the version conflict either by updating the version of the google-services plugin gradle同步失败,出现1条警告,请通过将google-services插件的版本更新为16.0.4来解决版本冲突 - gradle sync failed with 1 warning Please fix the version conflict either by updating the version of the google-services plugin to 16.0.4 错误:请通过更新google-services插件的版本来解决版本冲突 - Error:Please fix the version conflict either by updating the version of the google-services plugin 错误“请通过更新google-services插件的版本来解决版本冲突 - Error "Please fix the version conflict either by updating the version of the google-services plugin 具有相同的gradle级别仍然会通过更新google-services插件的版本引发修复版本冲突 - having the same gradle level still throws fix the version conflict either by updating the version of the google-services plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM