JayJona
JayJona

Reputation: 502

Unable to resolve dependency for... after update android studio from 3.4 to 3.5

today an update for android studio has arrived from version 3.4 to 3.5. With version 3.4 everything worked correctly while at the start of version 3.5 I find errors in my project with the circleimageview library. This is what comes up

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve de.hdodenhof:circleimageview:3.0.0.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve de.hdodenhof:circleimageview:3.0.0.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve junit:junit:4.12.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.squareup:javawriter:2.1.1.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve org.hamcrest:hamcrest-library:1.3.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve org.hamcrest:hamcrest-integration:1.3.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.google.code.findbugs:jsr305:2.0.1.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve de.hdodenhof:circleimageview:3.0.0.
Show Details
Affected Modules: app


ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve junit:junit:4.12.
Show Details
Affected Modules: app

and this is my build.gradle file (module: app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.uni.project"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'

    //circle imageview
    implementation 'de.hdodenhof:circleimageview:3.0.0'
}

I really don't know what could have gone wrong, how can I solve it? Is there a way to get back to version 3.4 since this project is important?

Upvotes: 0

Views: 714

Answers (2)

user11959069
user11959069

Reputation: 11

For me, the buildType was the problem. I removed that, did a Gradle sync, build the app and added it again.

Upvotes: 1

Dmytro Batyuk
Dmytro Batyuk

Reputation: 974

I see CircleImageView uses AndroidX underneath. Try migrate you project to AndroidX

Upvotes: 1

Related Questions