0

For the build.gradle configuration, everything is ok.

compileSdkVersion 26
defaultConfig {
    applicationId "com.my.app"
    minSdkVersion 16
    targetSdkVersion 26
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

dependencies {
implementation project(':market_licensing')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:design:26.1.0'
implementation "com.android.support:appcompat-v7:26.1.0"
}

When I migrate to version 27,

compileSdkVersion 27
defaultConfig {
    applicationId "com.my.app"
    minSdkVersion 16
    targetSdkVersion 27
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

dependencies {
implementation project(':market_licensing')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:design:27.1.1'
implementation "com.android.support:appcompat-v7:27.1.1"
}  

I have an error:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 26.1.0.

Why am I still showing a conflict with the old version 26.1.0? I do clean.

Bob
  • 22,810
  • 38
  • 143
  • 225
Albert
  • 3
  • 1
  • https://stackoverflow.com/questions/42374151/all-com-android-support-libraries-must-use-the-exact-same-version-specification – Md. Zakir Hossain Jan 08 '19 at 09:36
  • I have removed the implementation project (': market_licensing') The error is still. – Albert Jan 08 '19 at 09:44
  • Possible duplicate of [All com.android.support libraries must use the exact same version specification](https://stackoverflow.com/questions/42374151/all-com-android-support-libraries-must-use-the-exact-same-version-specification) – Shubham AgaRwal Jan 08 '19 at 10:17

2 Answers2

0

customtabs need to be provided in version 27.1.1 ...

implementation "com.android.support:customtabs:27.1.1"
implementation ("com.google.android.gms:play-services-ads:17.1.2") {
    exclude group: "com.android.support", module: "customtabs"
}
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
0

Try to clean and rebuild your project. Also if it does not work check whether all dependencies are the same and maybe change versions to a bit newer or older ones.

I also strongly recommend using androidX it's feels really good to me

Olehcoding
  • 122
  • 7