Failed to resolve: customview-1.1.0

Viewed 449

I am new to android, when compiling I get this error, it is a bit weird, because until not long ago I did not get it, and I have not made any important change in the project that I remember, and I tried to synchronize gradle, but it gives me 404 error, and I tried to find where this dependency is, because I haven't put any, so I have no idea, I'm quite confused, I thought it was going to be an easy problem to solve, but I can't find a solution, I can't do anything with the 404 error, I am using Avira VPN and Turbo VPN to connect, because without vpn it is impossible in my country, thanks to them I can develop in android, if someone could tell me if I have to add something to the gradle files or remove something I would appreciate it, I am quite stressed about it, android studio errors get over me sometimes This is all it shows me when I sync:

Failed to resolve: customview-1.1.0
Affected Modules: app

This shows me when I try to compile: note: here is the url that gives me error:

1: Task failed with an exception.

gradle app

    plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdkVersion 30
    buildToolsVersion '30.0.2'


    defaultConfig {
        applicationId "com.example.navigationrecicler"
        minSdkVersion 24
        targetSdkVersion 28
        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
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {
    implementation 'androidx.preference:preference-ktx:1.1.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.0'
    def work_version = "2.6.0"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    implementation "androidx.work:work-runtime-ktx:$work_version"
    implementation "com.anggrayudi:storage:0.12.0"
    implementation 'com.github.skydoves:progressview:1.1.2'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    implementation 'com.github.mmin18:realtimeblurview:1.2.1'
    implementation 'com.yarolegovich:discrete-scrollview:1.5.1'
    implementation 'com.github.chrisbanes:PhotoView:2.3.0'
    implementation 'com.github.CanHub:Android-Image-Cropper:3.3.5'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

gradle proyect

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.5.10"
    repositories {
        google()
        mavenCentral()
        maven { url "https://www.jitpack.io" }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.2"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://www.jitpack.io" }
        jcenter() // Warning: this repository is going to shut down soon
    }
}

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

If your problem is with connection , then here is how to solve this

Using your proxy or psiphon , you can set the local proxy port in your setting , lets say 30001

then you can go to %USERNAME%/.gradle/gradle.properties , if the file do not exist then create one.

then you can add this to gradle.properties

systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=30001


systemProp.https.proxyHost=8.36.224.208
systemProp.https.proxyPort=30001

this will make sure that all connection that gradle use , will go over the turned on proxy .

And after checking the dependencies , you dont have this dependency

runtimeOnly 'androidx.customview:customview:1.1.0' 
Related