Adding Github repo to Android Studio Dependencies Using Maven - android

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!

Related

Failed to resolve github libraries Android gradle

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.

Error:(44, 13) Failed to resolve: org.achartengine:achartengine:1.2.0 [duplicate]

I have to create an application that makes extensive use of charts.
Reading the web I chose achartengine that seems to have everything I need.
I downloaded the jar file, I plugged in the libs folder, I selected "add to library" and I lunch the gradlew clean.
Result in the sources where I do the import of org.achartengine.xxxx I always returned the error that fails to resolve symbols .
Do you have suggestions?
Thank you
Andrea
I am able to use this library in my Android Studio project, this topic explains how to add AChartEngine repo to your project.
What I did:
Added following to project-wide build.gradle (one from the project root):
allprojects {
repositories {
...
maven {
url "https://repository-achartengine.forge.cloudbees.com/snapshot/"
}
}
}
For every module that uses the library, add this to its build.gradle (you may put this to the top-level build.gradle if it should be included in all modules):
dependencies {
...
compile group: 'org.achartengine', name: 'achartengine', version: '1.2.0'
}
Now I can use the library in the project, I see the classes in code assist popups and build runs as succeeds.
It seems like the new version (1.2.0) is not available for download anymore in the http://www.achartengine.org/ site. and that's why the gradle/maven method doesn't work (or the snapshot file was removed).
I succeeded using and adding it to my project by downloading the jar file from here:
https://github.com/ddanny/achartengine/files/460139/achartengine-1.2.0.zip

Failed to resolve compile "org.java-websocket:java-websocket:1.3.2"

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

How to make it possible to add my Library on GitHub to Android Gradle Files?

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.

Add library to AndroidStudio project: Configuration with name 'default' not found

I got a project from a client which I'm supposed to fix. The developer of the app just bailed out and now it's up to me to fix it.
Problem is, that he probably developed with eclipse, while I'm using AndroidStudio. So it wasn't build with gradle. But I managed to import the project and fix it so far, that I can sync gradle.
But he seemed to use an external library, this one: https://github.com/InQBarna/TableFixHeaders
I copied the content of the library folder into my project folder /libraries/tablefixheaders/.
I added include 'libraries:tablefixheaders' to my settings.grade and added compile project('libraries:tablefixheaders') to my dependencies in build.grade.
But if I want to rebuild the project now, I get Error:Configuration with name 'default' not found.. Does the external library have to have a build.gradle? If so, how does it look like? I tried several things but nothing worked for me.
Maybe it's a bit late :)
but I build a wrapper for InqBarna's library ready to use with gradle on this way:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
dependencies {
compile "com.github.miguelbcr:TableFixHeaders-Wrapper:0.1.1"
}

Categories

Resources