Man Xoor
Man Xoor

Reputation: 35

Failed to resolve: com.android.support:appcompat-v7:24.4.0

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "abdulsamadgroup.com.asgroup"
        minSdkVersion 11
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.2.0'
    compile 'com.android.support:design:24.2.0'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.google.code.gson:gson:2.2.3'

}

and here is details of installed sdk i am using.

Help me solve this problem. I have been searching it from 2 days.

Upvotes: 2

Views: 7698

Answers (3)

Chayan Chowdhury
Chayan Chowdhury

Reputation: 129

Please update you JDk version .
For Updating 23.0.0 JDK version is 1.7. If you wanted to update more 24.0.0 or 25.0.1 your JDK version should be 1.8.

Error:Buildtools 25.0.1 requires Java 1.8 or above.  Current JDK version is 1.7.

Upvotes: 0

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75778

Update your Support Repository .

1st way

Set

    compileSdkVersion 24
    buildToolsVersion "24.0.2" 

And

 compile 'com.android.support:appcompat-v7:24.2.0'
 compile 'com.android.support:design:24.2.0'

Then Clean-Rebuild-Gradle .

2nd way

You can use latest version,

compileSdkVersion 25
buildToolsVersion "25.0.1"

And

compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'

Upvotes: 4

fsnasser
fsnasser

Reputation: 203

Try change compile 'com.android.support:appcompat-v7:24.2.0' to compile 'com.android.support:appcompat-v7:24.4.0'

Upvotes: 1

Related Questions