简体   繁体   English

我没有找到正确的解决方案google-service-plugin版本冲突

[英]I didn't find proper solution google-service-plugin version conflict

I didn't find proper solution to google-service-plugin version conflict 我没有找到解决Google-Service-Plugin版本冲突的正确方法

Error: 错误:

Error:org.gradle.api.GradleException: 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 10.0.1. 错误:org.gradle.api.GradleException:请通过更新google-services插件的版本来解决版本冲突(有关最新版本的信息, 访问https://bintray.com/android/android-tools/com .google.gms.google-services / )或将com.google.android.gms的版本更新为10.0.1。

Root level build.gradle 根级别build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'com.google.gms:google-services:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        jcenter()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}


dependencies {
}

app level build.gradle 应用程序级别build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.sha.agecalculator"
        minSdkVersion 9
        targetSdkVersion 25
        versionCode 11
        versionName "2.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.google.gms:google-services:3.0.0'
    compile 'com.google.firebase:firebase-ads:10.0.1'
    compile 'com.google.android.gms:play-services-ads:10.2.1'
    compile 'com.google.android.gms:play-services-analytics:10.2.1'

    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'


    compile 'joda-time:joda-time:2.3'
    testCompile 'junit:junit:4.12'
}


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

Wrong 错误

 compile 'com.google.gms:google-services:3.0.0' //remove this line from dependencies 

Do

compile 'com.google.android.gms:play-services:10.2.1' 
compile 'com.google.firebase:firebase-ads:10.2.1'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:support-v4:25.2.0'

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

相关问题 Google Play服务插件版本冲突 - Google play-service plugin version conflict Android Google Services插件版本冲突 - Android google services plugin version conflict 版本冲突(Google服务插件) - Version conflict (google-services plugin) Android-Google-Service插件冲突 - Android - google-service plugin conflict Android冲突Google Play服务版本 - Android conflict google play service version 无法解析“ adb版本”的输出-每个解决方案均不起作用 - Failed to parse the output of 'adb version' - every solution didn't work 通过更新google-services插件的版本来解决版本冲突 - fix the version conflict either by updating the version of the google-services plugin 谷歌 API: java.lang.ClassNotFoundException: 没有找到 class "sun.misc.Service" - Google API: java.lang.ClassNotFoundException: Didn't find class "sun.misc.Service" NativeScript | 无法运行Android应用:请通过更新google-services插件的版本来解决版本冲突 - NativeScript | Can't run Android app: Please fix the version conflict either by updating the version of the google-services plugin CheckBox在自定义列表视图的滚动中未选中,未找到解决方案 - CheckBox gets unchecked on scroll in a custom listview, didn't find a solution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM