0

This is my build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '28.0.1'
    defaultConfig {
        applicationId "*******"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        //multiDexEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile  'com.android.support:appcompat-v7:27.1.1'
    // compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:27.1.1'
    compile 'com.google.firebase:firebase-ads:15.0.0'
    compile 'com.google.firebase:firebase-core:15.0.2'
    compile 'com.google.firebase:firebase-messaging:15.0.2'
    compile 'com.google.firebase:firebase-auth:15.1.0'
    implementation 'com.google.firebase:firebase-database:15.0.1'
    //compile 'com.android.support:multidex:1.0.0'
    testCompile 'junit:junit:4.12'
    implementation files('libs/javax.mail.jar')
}
apply plugin: 'com.google.gms.google-services'

I think the things that could affect that error that are compile 'com.android.support:appcompat-v7:27.1.1' and compile 'com.android.support:design:27.1.1' are correct. According to this page it looks like that.

This is the full warning

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. examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:customtabs:26.1.0 less... (ctrl+f1) there are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. one such incompatibility is compiling with a version of the android support libraries that is not the latest version (or in particular, a version lower than your targetsdkversion).

I'm extremely confused abut that com.android.support:customtabs:26.1.0, I mean there isn't any 26.1.0 in any of the code I have posted.

Any idea of what could be happening?

user2638180
  • 1,013
  • 16
  • 37

1 Answers1

0

Possible duplicate of All com.android.support libraries must use the exact same version specification

Anyway because I cannot comment, Id rather answer it. Just add this to your app build.gradle:

implementation 'com.android.support:customtabs:27.1.1'

Reason and explanations: Here

Hamza Hathoute
  • 438
  • 3
  • 12