Mahmudul Hasan Shafin
Mahmudul Hasan Shafin

Reputation: 159

Android Studio org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:

I want to integrate the country code picker by hbb20. I put the dependency and build, it's fine but whenever I try to run the app then I got this error:

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.

My build.gradle app level codes:

plugins {
    id 'com.android.application'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.teamphoenix.amarflat"
        minSdk 22
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation "com.github.skydoves:powerspinner:1.1.9"
    implementation 'com.hbb20:ccp:2.4.7'
}

Upvotes: 13

Views: 59656

Answers (2)

Govind Dhage
Govind Dhage

Reputation: 39

I have same issue. My issue solved when

**

  • Gradle Toggle offline mode off

**

.
Just click Toggle offline mode and set mode off.

Upvotes: 4

I have had the same problem using mik3y's usb-to-serial.

I wrongly used:

com.github.mik3y:usb-serial-for-android:Tag

and changing it to :

com.github.mik3y:usb-serial-for-android:3.4.3

solved the problem.

I recommend you review all your dependencies, probably one of them does not point correctly to its repository, I hope I can help you. By the way, surely the (```) at the end of the code was just an editing error, right?

Upvotes: 5

Related Questions