Problem with resolving gradle dependencies in android studio?

I am trying to add a stylized progress bar from https://android-arsenal.com/details/1/1375

It says:

Add a specific repository to the build file:

repositories { maven { url "https://jitpack.io" } } 

Add the dependency to your build file (remember to specify the correct classifier, usually "aar"):

 dependencies { compile 'com.github.akexorcist:Android-RoundCornerProgressBar:1.0.0' } 

Ok, I did it ... build.gradle (Project)

 buildscript { repositories { jcenter() maven { url "https://jitpack.io" } } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } 

build.gradle (Module): apply the plugin: 'com.android.application'

android {compileSdkVersion 21 buildToolsVersion "21.1.2"

 defaultConfig { applicationId "com.example.chaz.simsirl" minSdkVersion 15 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.github.akexorcist:Android-RoundCornerProgressBar:1.0.0' } 

Then the messages say: Error: there was a problem setting up the project: app.

Failed to resolve all dependencies for configuration: app: _debugCompile. Could not find com.akexorcist: Android-RoundCornerProgressBar: 1.0.0. Search in the following places: https://jcenter.bintray.com/com/akexorcist/Android-RoundCornerProgressBar/1.0.0/Android-RoundCornerProgressBar-1.0.0.pom https://jcenter.bintray.com/com/akexorcist/ Android-RoundCornerProgressBar / 1.0.0 / Android-RoundCornerProgressBar-1.0.0.jar File: / C: /Users/pc/AppData/Local/Android/sdk/extras/android/m2repository/com/akexorcist/Android-RoundCornerProgressBar/1.0 .0 / Android-RoundCornerProgressBar-1.0.0.pom File: / C: /Users/pc/AppData/Local/Android/sdk/extras/android/m2repository/com/akexorcist/Android-RoundCornerProgressBar/1.0.0/Android- RoundCornerProgressBar-1.0.0.jar File: / C: /Users/pc/AppData/Local/Android/sdk/extras/google/m2repository/com/akexorcist/Android-RoundCornerProgressBar/1.0.0/Android-RoundCornerProgressBar-1.0.0 .pom File: / C: /Users/pc/AppData/Local/Android/sdk/extras/google/m2repository/com/akexorcist/Android-RoundCornerProgressBar/1.0.0/Android-RoundCornerProgressBar-1.0.0.jar Tr buet: SimsIRL: Appendix: Not determined

+8
android android-studio dependencies gradle
source share
2 answers

Try replacing your dependency as follows:

 compile 'com.akexorcist:RoundCornerProgressBar:1.0.0' 

This one is available at jCenter.

Then you can remove this:

 maven { url "https://jitpack.io" } 

Link: https://github.com/akexorcist/Android-RoundCornerProgressBar#download

0
source share

You will need to add the jitpack repository to another location:

 allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } } 

Then it works

In your first snippet, it was added under buildscript , and it should be removed from there.

+26
source share

All Articles