antonKozyriatskyi/CircularProgressIndicator

Failed to resolve dependency

n0490b opened this issue · 6 comments

Hi how can I resolve this error?
Failed to resolve: com.github.antonKozyriatskyi:CircularProgressIndicator:1.0.4

Hi! Did you add this lines in your root build.gradle?

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

And this in your module-level build.gradle in dependencies block?
implementation 'com.github.antonKozyriatskyi:CircularProgressIndicator:1.0.4'

I've just tested - it works fine.

Version 1.0.5 is available out now

Hi thank you but I'm still having the same problem

build.grade

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.app.app.app"
        minSdkVersion 22
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.github.antonKozyriatskyi:CircularProgressIndicator:1.0.5'
}

root build.grade

    
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url "https://dl.bintray.com/shinelw/maven" }
        maven { url "http://dl.bintray.com/populov/maven" }
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
        

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

@n0490b you added maven { url 'https://jitpack.io' } in wrong place in root build.gradle file.
It should be in allprojects block and not in buildscript

buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" } // <------------------------------------ not here
        maven { url "https://dl.bintray.com/shinelw/maven" }
        maven { url "http://dl.bintray.com/populov/maven" }
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
        

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

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' } // <--------------------------------- should be here
    }
}

Thank you that was dumb on my part

Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details