29jitender / Spotlight

Spotlight is an Android library used to onboard users by showcasing specific features in the app.
Apache License 2.0
1.27k stars 163 forks source link

Cannot install via Gradle #53

Open idulnyavka opened 7 years ago

idulnyavka commented 7 years ago
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 commented 7 years ago

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

idulnyavka commented 7 years ago

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

dhavalwooplr commented 7 years ago

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

idulnyavka commented 7 years ago

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.

zacharee commented 7 years ago

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 {}.