0

I am having issues with gradle in my android application.

android {
 compileSdkVersion 27
 defaultConfig {
    applicationId "za.co.gtsolutions.vivachoc"
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 2
    versionName "1.5"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso- 
core:3.0.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.android.support:design:27.1.1'
 implementation 'com.android.support:appcompat-v7:27.1.1'
 implementation 'com.stripe:stripe-android:6.1.2'
 implementation 'com.google.code.gson:gson:2.8.2'
  annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
 implementation 'testfairy:testfairy-android-sdk:1.+@aar'
 testImplementation "org.robolectric:robolectric:3.8"
 implementation 'com.facebook.android:facebook-login:4.32.0'
 android {
    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }
  }
   compile 'com.android.support:cardview-v7:27.1.1'
   compile 'com.android.support.test.espresso:espresso-contrib:3.0.1'

} I get the following error: all com.android.support libraries should use the same version and my application will not run because of this. I have changed the minimumSDK Version and targetVersion to apply to the project that i am working on. enter image description here I am totaly lost on what the issue could be ?

Tunga
  • 31
  • 5

2 Answers2

0

use 27.0.2 instead of 27.1.1 like below

implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
Heejae Kim
  • 519
  • 1
  • 4
  • 14
0

The answer after sometime is guided by the following answer: All com.android.support libraries must use the exact same version specification was the following:

implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation "com.android.support:customtabs:27.1.1"

The application needs to use the customtabs library which was missing

Tunga
  • 31
  • 5