looking for some solutions? You are welcome.

SOLVED: Could not solve "All com.android.support libraries must use the exact same version specification"

Alex:

I can not compile my project with the latest targetSdkVersion 28 and gradle:3.3.2 because of dependency conflicts "All com.android.support libraries must use the exact same version specification"

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '27.0.3'
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 369
        versionName "4.0.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    flavorDimensions "tier"
    productFlavors {
       playStoreFree {
            ...
        }
    }
}
repositories {
    mavenCentral()
    maven {
        url "https://maven.google.com"
    }
}
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.google.android.gms:play-services-ads:17.1.3'
    implementation 'com.google.android.gms:play-services-analytics:16.0.7'
    implementation 'com.google.firebase:firebase-core:16.0.7'
    implementation 'com.anjlab.android.iab.v3:library:1.0.44'
    implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
}

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

I read a lot of answers on stackoverflow about this issue but non of them really helped me to solve the problem. I am not doing anything fancy here, just trying to include all latest standard libs for google play, google ads, firebase, facebook etc. Can someone tell me the correct configuration for this?

Currently I have a working configuration for targetSDKVersion 27:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 369
        versionName "4.0.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    flavorDimensions "tier"
    productFlavors {
       playStoreFree {
            ...
        }
    }
}
repositories {
    mavenCentral()
    maven {
        url "https://maven.google.com"
    }
}
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(':SliderPreference')
    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.android.support:support-v4:27.0.2'
    implementation 'com.google.android.gms:play-services-ads:15.0.1'
    implementation 'com.google.android.gms:play-services-analytics:16.0.1'
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.anjlab.android.iab.v3:library:1.0.44'
    implementation 'com.facebook.android:facebook-android-sdk:4.31.0'
    implementation 'com.android.support:recyclerview-v7:27.0.2'
}

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



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent