簡體   English   中英

我沒有找到正確的解決方案google-service-plugin版本沖突

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

我沒有找到解決Google-Service-Plugin版本沖突的正確方法

錯誤:

錯誤:org.gradle.api.GradleException:請通過更新google-services插件的版本來解決版本沖突(有關最新版本的信息, 訪問https://bintray.com/android/android-tools/com .google.gms.google-services / )或將com.google.android.gms的版本更新為10.0.1。

根級別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 {
}

應用程序級別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'

錯誤

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

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM