1

I'm trying to add a dependency on https://github.com/DaleKocian/VolleyAndRxJava from my project, but I'm getting an error:

Error:(130, 13) Failed to resolve: com.github.DaleKocian:VolleyAndRxJava:+
<a href="openFile:/Users/michaelosofsky/Developer/android-sdk-1.2/locuslabs-android-sdk/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

I believe the problem is that I haven't specified the right tag, which, as specified, is required in Is it possible to declare git repository as dependency in android gradle?.

I don't know what to use a tag, because https://github.com/DaleKocian/VolleyAndRxJava doesn't seem to have any tag.

According to Gradle dependency version syntax, the syntax is specified with Ivy, but I can't tell from the Ivy documentation how I should specify there is no tag.

Here is an excerpt from my build.gradle file:

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.github.DaleKocian:VolleyAndRxJava:+'
}

Here are other values I tried for the Tag:

'com.github.DaleKocian:VolleyAndRxJava:+'
'com.github.DaleKocian:VolleyAndRxJava:'
'com.github.DaleKocian:VolleyAndRxJava'
'com.github.DaleKocian:VolleyAndRxJava:latest'
'com.github.DaleKocian:VolleyAndRxJava:latest.integration'
'com.github.DaleKocian:VolleyAndRxJava:latest.release'
'compile 'com.github.DaleKocian:VolleyAndRxJava:latest.[any status]'

None of those worked though so how should I add https://github.com/DaleKocian/VolleyAndRxJava as a dependency in my build.gradle file?

Community
  • 1
  • 1
Michael Osofsky
  • 11,429
  • 16
  • 68
  • 113
  • 2
    I don't see how it makes sense to use that as a dependency - it's an application, not a library. BTW, that syntax doesn't pull in a Git repository - it pulls in a binary artifact. – ephemient Apr 29 '17 at 00:03
  • Clearly I don't understand what I'm doing ;-P So if I want to use that repo's code, should I just copy the source into my project? – Michael Osofsky Apr 29 '17 at 00:05
  • 1
    That's right. You could add it as a [git submodule](https://git-scm.com/docs/git-submodule) or [git subtree](https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree) to your repo if you want to keep track of it, but that's not necessary. – ephemient Apr 29 '17 at 00:07

1 Answers1

2

Examples of using rx java with volley

That's all that repository is. Examples.

It's not a library like Volley or RxJava themselves.

You can clone that library separately from your project, and install it, run some examples, then copy the necessary sections of code to your own app.


If you did have a library that wasn't published to BinTray, then JitPack could allow you compile Github projects using tags or commit references

For reference: https://jitpack.io/#DaleKocian/VolleyAndRxJava

But, as stated, it's not a library

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245