Error:Could not find: vectordrawable-animated-1.1.0

Viewed 1199

I have a problem with gradle. it was working fine but all of sudden when I was rebuilding the project it gives me this error:

Could not find vectordrawable-animated-1.1.0.jar (androidx.vectordrawable:vectordrawable-animated:1.1.0).
Searched in the following locations:
    https://dl.google.com/dl/android/maven2/androidx/vectordrawable/vectordrawable-animated/1.1.0/vectordrawable-animated-1.1.0.jar

I can't find out what my problem is? My app.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.example.pakagename"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    }

    defaultConfig {
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'com.airbnb.android:lottie:3.4.1'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.loopj.android:android-async-http:1.4.10'
    implementation 'com.github.mreram:showcaseview:1.1'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'

    implementation 'com.github.dhaval2404:imagepicker-support:1.5'
    implementation 'com.github.aliab:Persian-Date-Picker-Dialog:1.5.2'

    implementation 'com.wang.avi:library:2.1.3'
    implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.0'




    implementation 'com.github.smarteist:autoimageslider:1.3.7-appcompat'

    implementation 'com.wang.avi:library:2.1.3'
    implementation 'com.android.support:design:28.0.0'

    implementation 'com.github.jaiselrahman:FilePicker:1.3.2'
    implementation 'ir.he.meowdatetimepicker:library:1.0.2'
    implementation 'cat.ereza:customactivityoncrash:2.3.0'
}

and my build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
        maven { url 'https://dl.bintray.com/tapsellorg/maven' }
    }
}
2 Answers

I guess this is due to not proper download of packages (sanctions and ...). I did following steps and worked:

  1. Connect to VPN
  2. Remove caches and deamons folder from ~/.gradle.
  3. Run gradlew clean inside android folder (cleaned project gradle).
  4. Re run the project
Related