Spotlight icon indicating copy to clipboard operation
Spotlight copied to clipboard

Cannot install via Gradle

Open idulnyavka opened this issue 7 years ago • 5 comments

buildscript {
    repositories {
        //...
        maven { url "https://jitpack.io" }
    }

    //...
}

//...
dependencies {
    //...
    compile 'com.github.wooplr:Spotlight:1.2.3'
}

=> Error on Sync:

Error:Could not GET 'http://oss.jfrog.org/artifactory/oss-snapshot-local/com/github/wooplr/Spotlight/1.2.3/Spotlight-1.2.3.pom'. Received status code 409 from server: Conflict Enable Gradle 'offline mode' and sync project

Also, trying to open the URL above into a browser gives more details on the error:

{
  "errors" : [ {
    "status" : 409,
    "message" : "The repository 'oss-snapshot-local' rejected the resolution of an artifact 'oss-snapshot-local:com/github/wooplr/Spotlight/1.2.3/Spotlight-1.2.3.pom' due to conflict in the snapshot release handling policy."
  } ]
}

idulnyavka avatar Mar 06 '17 15:03 idulnyavka

Same error trying to include v 1.2.2 Android Studio 2.2.3 (Windows 10)

idulnyavka avatar Mar 06 '17 15:03 idulnyavka

Hmm... worked after I added repository to root gradle.build file under "allprojects ". Why is it not working under project-specific gradle file?

idulnyavka avatar Mar 06 '17 15:03 idulnyavka

I'm using it in the project specific gradle file without any sync errors. Your error seems about some conflict.

dhavalwooplr avatar Mar 07 '17 09:03 dhavalwooplr

Nope... As I told above - it dod not work when I put repository to the project build file, but worked within app level file. Putting back to project file raised error again. Anyway, it compiles according to the README file, so let's consider this not an issue but a feature request.

idulnyavka avatar Mar 08 '17 13:03 idulnyavka

Try removing the buildscript {} part. I've noticed that Gradle seems to ignore repositories under this category, and instead only sees repositories if they're only under repositories {}.

zacharee avatar Jul 11 '17 00:07 zacharee