2016-08-19 17 views
0

エラーバージョンの競合。のGradle:</p> <p>エラー:実行はタスクに失敗しました ':アプリ:processDebugGoogleServices' 私は、このようなエラーを得た

Please fix the version conflict either by updating the version of the google-services plugin or updating the version of com.google.android.gms to 9.0.0.

Googleのサービスプラグインを更新したり、com.google.android.gmsのバージョンを更新するにはどうすればよいですか? build.gradleで何を変更する必要がありますか?

マイアプリ/ build.gradle:ルートbuild.grade

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "24.0.1" 

    defaultConfig { 
     applicationId "com.example.test" 
     minSdkVersion 15 
     targetSdkVersion 24 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    packagingOptions{ 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE-FIREBASE.txt' 
     exclude 'META-INF/NOTICE' 

    } 
} 

dependencies { 
    compile 'com.android.support:appcompat-v7:23.1.1' 

    // Firebase Authentication 
    compile 'com.google.firebase:firebase-auth:9.4.0' 

    // Google Sign In SDK (only required for Google Sign In) 
    compile 'com.google.android.gms:play-services-auth:9.4.0' 

    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' 
    androidTestCompile 'com.android.support.test:runner:0.5' 
} 

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

コード:

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.0.0' 
     classpath 'com.google.gms:google-services:3.0.0' 

    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 
+1

あなたの* Gradle *にこの 'apply plugin: 'com.google.ms.google-services'を' apply apply: 'com.google.gms.google-services''に変更してください。 –

答えて

1

は、あなたがあなたのスクリプトのタイプミスがあります

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

する必要があります
apply plugin: 'com.google.gms.google-services' 
+0

あなたは正しいです、ありがとう! –

関連する問題