0

I have following code in build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.example.myapp.myapplication"
        minSdkVersion 14
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    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'
    })
    compile 'com.android.support:appcompat-v7:26.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.thefinestartist:finestwebview:1.2.7'
    testCompile 'junit:junit:4.12'
}
allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com'
        }
    }
}

But i get error for the following line

compile 'com.android.support:appcompat-v7:26.0.0'

enter image description here

enter image description here

Can any one help me how to fix this issue ?

Vision Coderz
  • 8,257
  • 5
  • 41
  • 57
  • 2
    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) –  Aug 29 '17 at 17:38
  • 1
    You are using a library (`com.thefinestartist:finestwebview:1.2.7`) that relies upon three-year-old versions of the support libraries. I recommend that you either stop using that library or fork it, so that you can maintain your fork and keep it up to date with respect to the support library version. – CommonsWare Aug 29 '17 at 17:46
  • yup.thanks CommonsWare.Because of that its giving an erorr – Vision Coderz Aug 29 '17 at 17:48

3 Answers3

1

problem is with compile 'com.thefinestartist:finestwebview:1.2.7' check below screen shot

problem is with  compile 'com.thefinestartist:finestwebview:1.2.7'

Solution :

https://stackoverflow.com/a/25736483/793943

Sush
  • 3,864
  • 2
  • 17
  • 35
0

This means your build version is 26.0.1 but ur support gradle version is 26.0.0. Change the support appcompat version from 26.0.0 to 26.0.1 and build.

Aalap Patel
  • 2,058
  • 2
  • 17
  • 31
0

Try adding below code to your project level build.gradle file, it should work

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com'
       }
    }
}
Anshul
  • 79
  • 4