-2

My build.gradle(Module:app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "co.balraj.thawedarshan.thawedarshan"
        minSdkVersion 15
        targetSdkVersion 18
        versionCode 2
        versionName "1.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled = true
        manifestPlaceholders = [manifestApplicationId: "${applicationId}",
        onesignal_app_id: "7a55b2de-e55d-4c10-8381-7ec71c0edddb",
        onesignal_google_project_number: "347030018851"]
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    //CardView

    //Universal Image Loaader

    compile files('libs/YouTubeAndroidPlayerApi.jar')


    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:recyclerview-v7:26.+'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support:cardview-v7:26.+'
    compile 'com.android.support:support-vector-drawable:26.+'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile 'com.android.support:support-v4:26.+'
    compile 'com.google.android.gms:play-services-ads:11.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.mcxiaoke.volley:library:1.0.19'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.google.android.gms:play-services-identity:11.+'
    compile 'com.google.android.gms:play-services-gcm:11+'
    compile 'com.google.android.gms:play-services-analytics:11.+'
    compile 'com.google.android.gms:play-services-location:11.+'
    compile 'com.onesignal:OneSignal:2.+@aar'

    testCompile 'junit:junit:4.12'
}

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

Error

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]

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 11.+.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Balraj
  • 65
  • 5
  • I'm not able to understand it or what to do. – Balraj Nov 26 '17 at 00:16
  • ` buildscript { repositories { jcenter() mavenCentral() maven { url 'https://maven.google.com' } } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:3.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }` – Balraj Nov 26 '17 at 00:19
  • This [answer](https://stackoverflow.com/questions/34370603/version-conflict-updating-to-8-4-0#34375483) might be helpful – user10089632 Nov 26 '17 at 00:24

1 Answers1

0

compile your code with

dependencies {
    compile 'com.google.android.gms:play-services:+'
}

and remove

compile 'com.google.android.gms:play-services-identity:11.+'
compile 'com.google.android.gms:play-services-gcm:11+'
compile 'com.google.android.gms:play-services-analytics:11.+'
compile 'com.google.android.gms:play-services-location:11.+'

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

It should work

Check if you have placed this in your gradle:

repositories {
    jcenter()
    maven {
        maven { url "https://maven.google.com" }
    }
}
MezzDroid
  • 560
  • 4
  • 11