AFS
AFS

Reputation: 1443

Build gradle failed for google play services version

When I try to execute buid.gradle I get this error on android studio

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.

and this is the module build.gradle file

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'
}

In this file the play services version is 8.4.0 but I don't know whre I have to update the version from 8.3.0 to 8.4.0

Upvotes: 0

Views: 848

Answers (3)

Atiq
Atiq

Reputation: 14825

Updated

well try this

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'

Adding 'com.google.gms.google-services' at the end solved it for me

Hope it helps

Upvotes: 4

Ramkumar.M
Ramkumar.M

Reputation: 691

try this

compile 'com.google.android.gms:play-services-gcm:8.4.0'

Upvotes: 0

Jared Burrows
Jared Burrows

Reputation: 55517

  1. Do not use jars
    • Remove this line compile fileTree(include: ['*.jar'], dir: 'libs')
  2. Do not use play-services.
    • Please choose one like: play-services-analytics

For example:

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'
}

Upvotes: 0

Related Questions