Когда я пытаюсь выполнить build.gradle, я получаю эту ошибку в студии Android

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 8.3.0.

И это файл модуля build.gradle

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

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.gs.lasarenas"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.google.android.gms:play-services:8.4.0'
}

В этом файле версия игровых сервисов - 8.4.0, но я не знаю, где мне нужно обновить версию с 8.3.0 до 8.4.0.

0
AFS 30 Апр 2016 в 00:56

3 ответа

Лучший ответ

Обновлено

Хорошо попробуйте это

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:design:25.0.0'
    compile 'com.google.android.gms:play-services:9.8.0'
}

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

Добавление 'com.google.gms.google-services' в конце решило эту проблему для меня

Надеюсь, это поможет

4
Max 9 Ноя 2016 в 12:25

Попробуй это

compile 'com.google.android.gms:play-services-gcm:8.4.0'
0
Ramkumar.M 30 Апр 2016 в 06:34
  1. Не используйте банки
    • Удалить эту строку compile fileTree(include: ['*.jar'], dir: 'libs')
  2. Не используйте play-services.
    • Выберите один из вариантов: play-services-analytics

Например:

dependencies {
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.google.android.gms:play-services-auth:8.4.0'

    testCompile 'junit:junit:4.12'
}
0
Jared Burrows 30 Апр 2016 в 05:36