Вопрос

I know this must be a pretty basic question, but I'm new to Android Studio and gradle, and I can't find any up-to-date info on this.

I'm trying to add this library to my project: android-segmented-control.

It doesn't look like I can add it to my build.gradle file (correct?). I'd like to do it that way, of course, and not download the project if possible.

If I do need to download the project, how do I link it up with my existing project? Again, I haven't been able to find anything that is current that describes this process for Android Studio 0.5.3

Это было полезно?

Решение 2

Thanks @Thomas Bouron for the hint !
I have pushed my library to maven center, so you just need to add the following dependency to your build.gradle.

dependencies {
    compile 'info.hoang8f:android-segmented:1.0.0'
}

(A little late for @workInAFishBowl but it may be helpful for others.).

Другие советы

The library you mentioned does not seems to be pushed on maven central or any other maven repository. As this library contains resources files, you cannot add it as a jar.

The only way to use it is clone the git repository and add it as a module to your android app project.

Meanwhile, you can ask the author to make it available on a Maven repository like OSS sonatype

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top