2016-09-15 2 views
0

я получаюОшибка: Не удалось завершить выполнение задачи для ': приложение: processDebugGoogleServices'

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.

Улучшенный build.gradle

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

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

Возможный дубликат [build.gradle ошибки с com.google.android.gms: играть-услуги-карт: 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' 
Смежные вопросы

 Смежные вопросы