In recent days I'm getting failed to resolve github libraries for so many popular libraries. I know it generally happens when the library is suspended or not available. But i tried it for so many libraries. And getting same result. But doesn't mean every libraries don't work. Some works.
For example..
I tried it for PhotoView..
compile 'com.github.chrisbanes:PhotoView:2.0.0'
In the release page the latest version was 2.0.0
I get same thing for so many other libraries. I think last week I updated the gradle. So is that why I'm getting this problem for some libraries..
Or what can be the problem..
I'm also using all maven urls for all libraries as mentioned in the docs file..
Make sure you added this root build.gradle file (Not your module build.gradle file):
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
FYI
New version has been released, You can try with
compile 'com.github.chrisbanes:PhotoView:2.1.3'
After that, Clean-Rebuild-Run.
Related
... even when the error reports the correct download URL.
(Bintray details below.)
Gradle Repo
repositories {
jcenter()
maven { url 'https://dl.bintray.com/myUsername/myRepo/' }
}
Dependencies
compile('com.domain.groupid:library-core:v1.2.3#aar') {
transitive=true
}
compile('com.domain.groupid:library-support:v1.2.3#aar') {
transitive=true
}
Error
Error:Could not find library-core.aar (com.domain.groupid:library-core:v1.2.3).
Searched in the following locations:
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/v1.2.3/library-core-v1.2.3.aar
If I copy that URL, I can download it in a signed out window. Why does Gradle have a problem with it?
There is another similar compile dependency (listed here as library-support), but I'm assuming it didn't get to it because this one failed first.
The setup...
I have a personal public repo on Bintray, with two android libraries.
https://bintray.com/myUsername/myRepo/library-core
https://bintray.com/myUsername/myRepo/library-support
Both have versions upload by the bintray rule in my library's gradle scripts. The versions upload, I can see them in the bintray UI, and I can download them and see that they are what I expected:
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/maven-metadata.xml
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3-sources.jar
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3.aar
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3.pom
// Same for library-support. All of these download in a signed out window.
Is gradle expecting something else?
Maven usually doesn't expect the v prefix in the version attribute. It's implied by the order of coordinate syntax: <group>:<name>:<version>. Using semantic versioning for the version number should do the trick.
I had a similar issue, adding another answer to hopefully help others in the future.
In my case, I first only uploaded the .jar file to the maven repo, then when I uploaded the .aar file, it couldn't find it even though the error URL properly linked to the artifact.
Adding
--refresh-dependencies
to my gradle command fixed the issue for me
I'm currently attempting to include this github repository to my android studio project. I tried following the instructions given in this question but to no avail.
I've added the line maven { url "https://jitpack.io" } to my project build.gradle as well as this line compile 'com.github.karussell:snacktory' to my module build.gradle file and I get a failed to resolve error. In the question that I linked earlier, it says to follow this format for adding the library compile 'com.github.User:Repo:Tag' but I'm not sure what the tag part of it is supposed to be.
The github repo has a pom.xml file which lists other dependencies which I've been able to add without an issue. Any suggestions on how to include this particular library?
I used this repo as suggested by #Randyka Yudhistira and it worked perfectly!
I am developing chat application based on a demo from github. They used java-webocket:1.3.2, I was using java-websocket:1.3.1 but I got error because in 1.3.1 there is no setSocket() method. Then I changed in the gradle my version and suddenly I got this error
Failed to resolve compile "org.java-websocket:java-websocket:1.3.2"
I tried to find jar of this library but I could not find. I do not know why this is happening I am stuck with this error for 2 hours now, my internet is working fine but I cannot add java-websocket:1.3.2 to my dependencies but its working fine when I change back to 1.3.1
please add maven { url 'http://clojars.org/repo' } into your build.gradle that under the project then it will work.
did you add their maven repository to your build?
central only carries that artifact up to 1.3.0 (see link)
as per their website, you need to add their repo:
maven { url "http://clojars.org/repo" }
to your build.gradle
I have a project hosted on GitHub at https://github.com/BoardiesITSolutions/NavigationDrawerManager.
I've seen some projects on GitHub state adding it to their gradle file in Android Studio to the dependencies section but this doesn't seem to be working for me.
I have tried compile: 'com.github.boardiesitsolutions.NavigationDrawerManager:+' but it keeps saying it can't find it, I've also tried replacing the + with the version number but no luck, Android Studio keeps saying it can't find it. I've added the repository MavenCentral as well.
Is there something I need to do from GitHub to make it accessible for Gradle?
I don't see it on maven.
You can use this website to use non-mavenized libraries with Gradle.
Just add maven { url "https://jitpack.io" } to repositories section of build.gradle and use compile 'com.github.BoardiesITSolutions:NavigationDrawerManager:0b14c84445' in dependencies.
I'm trying use BlurBehind Lib but I getting a error.
Error:Failed to find: com.faradaj:blur-behind:[LATEST_RELEASE_VERSION]
I added
dependencies {
compile 'com.faradaj:blur-behind:[LATEST_RELEASE_VERSION]'
}
I'm still adapting to the new IDE, and I appreciate any help!
Here is how you properly add this library:
Step one
repositories {
maven {
url "https://jitpack.io"
}
}
Step two
dependencies {
compile 'com.github.faradaj:BlurBehind:1.0.3'
}
Couple of things here.
First of all, this library is not distributed from JCenter or even Maven Central.
That means that you need to build it from source. Feel free to +1 this issue.
Luckily, it's rather straightforward, just follow the github instructions.
Once you done that, you'll need to specify the version instead of [LATEST_RELEASE_VERSION].
At the moment it's 1.0.3.