ERROR: Failed to resolve: com.github.JesusM:HoloCircleSeekBar:v2.2.2 - android

I am working on a project where I have used com.github.JesusM:HoloCircleSeekBar:v2.2.2 library. When I tried to make the build in my system, it worked without any issue but when I tried to run the same project in other system it got the issue that the library can't be resolved. What could be the reason?

you can read the instruction in the Github page of the library
add this line in the build.gradle repositories in project level
maven {url "https://jitpack.io"}
like this
allprojects {
repositories {
google()
jcenter()
maven {url "https://jitpack.io"}
}
}
also, you can download the source code and add to your project as a module(the library not updated for 4 years so a lot of changes happens) and change dependencies and codes to work properly

Related

Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1)

I have a unity project I am exporting that project as android studio project while opening the android studio project I am getting this error
Gradle sync failed: Could not find manifest-merger.jar
(com.android.tools.build:manifest-merger:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/manifest-merger/26.0.1/manifest-merger-26.0.1.jar
I have a few old exported project that was working fine before but today they are also giving the same error.
I finally fixed the issue. This may be a workaround but it works.
So if anyone having this issue, just follow this:
Swap the position of jcenter() and google() in project gradle file and in also all the other module you have in your project. Like in mine I have crashlytics, fabric so just remember to make the changes in their build.gradle file as well:
buildscript {
repositories {
jcenter()
google()
}
}
to
buildscript {
repositories {
google()
jcenter()
}
}
Before building your project again go to your project folder and delete the .gradle folder from your project and then build your project.
Go to Publishing Settings/Build, enable Custom Gradle Template
Go to Assets/Plugins/Android/mainTemplate.gradle and change the postion from
buildscript {
repositories {
jcenter()
google()
}
to
buildscript {
repositories {
google()
jcenter()
}
Remove gradle cache and rebuild. For Mac you can run rm -rf $HOME/.gradle/caches/ in terminal.
Jcenter no longer hosts google dependencies, these can be resolved from "https://maven.google.com"
so you can simply add that to the resolvers list along with jcenter.
Regards,
Itamar
The problem is definitely having jcenter() above google().
However for me, my build.gradle was correct.
The problem happened because of one of my dependencies library had that problem.
The problem seemingly started happening out of nowhere, probably because my jar was cached.
I solved the problem by upgrading my problematic library to latest version as that contained a fix.

Failed to resolve: play-services-tasks-license [duplicate]

suddenly gradle is unable to build the same code that was working moments ago !
my project depends on google play service dependencies
it says :
Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar
I think the aar file was removed from google by mistake
Does anyone have any idea, what is going on?
Add google() repository in your build.gradle. And check that google() is before jcenter().
The problem seems to be with jcenter. I have spent hours together with this problem and your problem seems to be similar to mine and I think the following solution should work.
For some reason and for many libraries in jcenter, the pom files of many libraries are kept in place but corresponding aar files have been removed. This is also the case with play-services-basement library. Check the following here for reference ( pom file of play-services-basement is available at jcentre here but aar file is not available at jcentre here):
Solution :
In your project level gradle file , change the following block of code
allprojects {
repositories {
jcenter()
google()
}
}
to
allprojects {
repositories {
google()
jcenter()
}
}
why this works ?
In our first code block, when gradle tries to resolve a dependency in the repository(in my case,it was google-services-basement in jcentre repository), it ddi not get resolved as corresponding aar files has been removed. As a result , build fails with something like :
Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1).
In our second code block, google repository has been referenced before jcenter repository. When gradle build starts, it looks first in the libraries listed first in repositories{... for resolving any library that is used in the project. Now, when gradle tries to resolve play-services-basement in jcenter, it is successful in resolving dependency as corresponding aar file has been made available by google repository(the same aar file of latest version is not available in jcenter repository) which has been referenced before jcenter repository is assessed. Do check and let me know if that works.
IN Worked
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://jitpack.io'
}
maven {
url 'https://maven.google.com'
}
}

Android gradle Failed to resolve: play-services-basement

suddenly gradle is unable to build the same code that was working moments ago !
my project depends on google play service dependencies
it says :
Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar
I think the aar file was removed from google by mistake
Does anyone have any idea, what is going on?
Add google() repository in your build.gradle. And check that google() is before jcenter().
The problem seems to be with jcenter. I have spent hours together with this problem and your problem seems to be similar to mine and I think the following solution should work.
For some reason and for many libraries in jcenter, the pom files of many libraries are kept in place but corresponding aar files have been removed. This is also the case with play-services-basement library. Check the following here for reference ( pom file of play-services-basement is available at jcentre here but aar file is not available at jcentre here):
Solution :
In your project level gradle file , change the following block of code
allprojects {
repositories {
jcenter()
google()
}
}
to
allprojects {
repositories {
google()
jcenter()
}
}
why this works ?
In our first code block, when gradle tries to resolve a dependency in the repository(in my case,it was google-services-basement in jcentre repository), it ddi not get resolved as corresponding aar files has been removed. As a result , build fails with something like :
Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1).
In our second code block, google repository has been referenced before jcenter repository. When gradle build starts, it looks first in the libraries listed first in repositories{... for resolving any library that is used in the project. Now, when gradle tries to resolve play-services-basement in jcenter, it is successful in resolving dependency as corresponding aar file has been made available by google repository(the same aar file of latest version is not available in jcenter repository) which has been referenced before jcenter repository is assessed. Do check and let me know if that works.
IN Worked
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://jitpack.io'
}
maven {
url 'https://maven.google.com'
}
}

Ionic3 Build-Error: Could not find play-services-auth-base.aar (15.0.1)

i have a bigger Ionic3 project running and did not do any changes since i had a successful build last time. Today, i tried to build again, getting the error:
Could not find play-services-auth-base.aar (com.google.android.gms:play-services-auth-base:15.0.1).
I can not figure out why this happens. Cordova-platform is Version 6.3.0.
Steps done so far:
Installed cordova-android-play-services-gradle-release, which 15.+ as version during the build
Installed cordova-android-support-gradle-release, which 27.+ as version during the build
Manipulated gradle.build within the platform, as recommended in other stackoverflow-questions.
Maybe updating cordova to 7.x also is an option, but i want to avoid it due to multiple cordova plugin dependencies.
Code:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
There is currently something wrong with the jcenter() repository. I guess they will fix that soon.
Anyway, for the most packages a fix could be to add the google() repository at the first position in the build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
}
allprojects {
repositories {
google()
maven {
url "https://maven.google.com"
}
jcenter()
}
It's important that google() is listed before jcenter().
If your app does not require any of the newer Google APIs, try specifying an older Play Services Version in your config.xml file. I got a successful build by using 11.6.2. Anything newer gave me the same build error.
According to this: https://developer.android.com/topic/libraries/support-library/setup
if you're using a version of Gradle lower than 4.1, you must use
maven { url 'maven.google.com'; }
instead of
google()
As far as I can see, this error may also occur, when Google or anyone else marks the repository "google-cache" as "blacked-out". Then instead of getting the library you want, you'll get a json string representig that error. It seems that this is enough information for Android Studio to say "OK, found a library entry, but its not there", so the build will fail. google() or maven() should then provide a backup entry, but because jcenter() was the first repository in the list and has given a "proper answer" of the request gradle won't ask the other repos for a solution.
As #Manuel already posted, just put the google() repo before jcenter() in your projects build.gradle.

getting failed to resolve when adding dependency

I am trying to add an external dependency from jcenter
compile 'com.droidninja:filepicker:2.0.4'
but I keep getting these errors and I can't figure out what is going wrong.
I have seen the same errors come up in lot of projects but nobody seems to know whats going wrong.
The problem is not with the dependency you just added but the Android Support library's dependencies. The latest SDK updates move towards using the remote Google Maven repository instead of downloading everything to be available locally. In order to fix dependency resolution problems follow the Adding Support Libraries guide. Really briefly this is what you have to do:
Open your project's build.gradle (note that this is not the module's file!)
Add the Google Maven repo to the project repositories:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
It's also recommended to add the repo to the buildscript block too, so later on the Gradle plugins can be downloaded from there too:
buildscript {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}

Categories

Resources