2016-09-15 17 views
0

私は優れたbuild.gradleエラー:実行タスクに失敗しました ':アプリ:processDebugGoogleServices'

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

    } 
} 
... 

のApp build.gradle

Error:Execution failed for task ':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 9.0.0.

を取得しています

apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "my.package.name" minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionName "1.0" multiDexEnabled true } dexOptions { javaMaxHeapSize "2g" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } repositories { mavenCentral() } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:recyclerview-v7:23.4.0' compile 'com.android.support:cardview-v7:23.4.0' compile 'com.android.support:design:23.4.0' compile 'com.android.support:support-v4:23.4.0' compile 'com.android.support:multidex:1.0.1' compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' compile 'com.github.johnkil.android-progressfragment:progressfragment:1.4.0' compile 'com.squareup.picasso:picasso:2.5.0' compile 'com.github.castorflex.smoothprogressbar:library-circular:1.2.0' compile project(':facebook') compile 'com.google.android.gms:play-services:9.4.0' } 
+1

[com.google.android.gmsとエラーbuild.gradle:プレイサービスマップ:9.4.0]の可能な重複(http://stackoverflow.com/questions/39505402/error-build- gradle-with-com-google-android-gmsplay-services-maps9-4-0) –

+1

ありがとうございます。問題は(あなたのリンクによって解決されました)、 プラグインを適用することでした: 'com.google.gms.google-services'は、アプリケーションbuild.gradleの一番下にある必要があります。あなたがそれを見つけたら – flagg327

+0

私の答えを投票してください! :D –

答えて

0

apply plugin: 'com.google.gms.google-services'を.gradleの末尾にstated in the documentationと入れてみましたか?

apply plugin: 'com.android.application' 

android { 
    // ... 
} 

dependencies { 
    // ... 
    compile 'com.google.firebase:firebase-core:10.0.1' 

    // Getting a "Could not find" error? Make sure you have 
    // the latest Google Repository in the Android SDK manager 
} 

// ADD THIS AT THE BOTTOM 
apply plugin: 'com.google.gms.google-services' 
関連する問題