Android Studio: Gradle Sync fail with support-v4-24.1.1.jar

Naresh Koppera picture Naresh Koppera · Sep 30, 2016 · Viewed 13.6k times · Source

I am getting gradle issue . here is below issue in gradle message, while doing sync in gradle Our Android Studio version is 2.1.2.

Error:A problem occurred configuring project ':LetMeCall_Store'. Could not find support-v4.jar (com.android.support:support-v4:24.1.1). Searched in the following locations: https://jcenter.bintray.com/com/android/support/support-v4/24.1.1/support-v4-24.1.1.jar

Below is gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "com.app.letmecall.store"
        minSdkVersion 15
        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.1.1'
    compile 'com.android.support:design:24.0.0-beta1'
    compile 'com.android.support:support-v4:24.0.0-beta1'
    compile 'com.android.support:recyclerview-v7:24.1.1'
    compile 'com.android.support:cardview-v7:24.0.0-beta1'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile 'com.loopj.android:android-async-http:1.4.6'
    compile 'com.daimajia.androidanimations:library:1.0.3@aar'
    compile "com.google.android.gms:play-services:8.3.0"
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'
    compile 'com.android.support:multidex:1.0.0'
}

Plz anyone help us to fix that issue Advance thanks

Answer

Someone Somewhere picture Someone Somewhere · Oct 24, 2016

I upgraded all my Android SDK tools (including "Support Repository"), however, I still got the error

Gradle sync failed: Could not find recyclerview-v7.jar (com.android.support:recyclerview-v7:24.1.1)

I then did the following :

  1. targetSdk 24 (was 23)
  2. buildToolsVersion: "24.0.3" (was 24.0.0)
  3. deleted the folders within /.gradle/caches I have windows and the complete path is C:\Users\USERNAME\.gradle\caches

THEN the project built without error !!