Describe the bug
If you have maven { url "https://jitpack.io" } as your resolving url, then Jitpack will only return the POM for the Android dependency causing the Gradle sync to fail. The workaround currently is to wipe the dependency from your cache and update the resolving url to maven { url "https://www.jitpack.io" }
To Reproduce
Steps to reproduce the behavior:
Expected behavior
POM, AAR, and sources.jar are all resolved for the dependency.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Take a look here: https://stackoverflow.com/a/52812651/3595288
@vasiledoe this SO issue has been raised on May 17th, 2018. The response is from October, 2018. This GitHub issue was created seven days ago. The StackOverflow question _points to this_...
Hi,
What is the error you are seeing when installing com.github.PhilJay:MPAndroidChart:v3.1.0 ?
It'd be great if you could run gradle with the --info flag. That way it'll provide a more detailed error message
Using www.jitpack.io resolved the issue for me, see https://github.com/expo/expo/commit/bb2d4b04845f6e4813e51b02149c3f5eef1b606b
I had troubles with https://github.com/franmontiel/PersistentCookieJar too, I can test later to see if I can repro the issue. (Since it was an old lib, I forked it and included it in my source). I recall I did the fork because it wasn't working when used via Gradle to some developers; we didn't think of trying the www.jitpack vs. just jitpack back then.
In any case, I think both jitpack.io and the github page should _agree_ on what they recommend. Should users use jitpack.io or www.jitpack.io; currently, they resolve to different hosts.
$ dig jitpack.io
; <<>> DiG 9.11.5-P1-1ubuntu2.5-Ubuntu <<>> jitpack.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23299
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;jitpack.io. IN A
;; ANSWER SECTION:
jitpack.io. 300 IN A 104.24.22.62
jitpack.io. 300 IN A 104.24.23.62
And
$ dig www.jitpack.io
; <<>> DiG 9.11.5-P1-1ubuntu2.5-Ubuntu <<>> www.jitpack.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7522
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;www.jitpack.io. IN A
;; ANSWER SECTION:
www.jitpack.io. 1564 IN A 149.56.28.39
We're seeing issues with both www.jitpack.io and jitpack.io now...
Hi,
What is the error you are seeing when installing
com.github.PhilJay:MPAndroidChart:v3.1.0?
It'd be great if you could run gradle with the--infoflag. That way it'll provide a more detailed error message
@mbwhite Can you run gradle with the '--info' flag as suggested above and please post the error message? Thanks!
Has anyone figured out a workaround, been struggling with this for days, with both www.jitpack.io and jitpack.io now
Hi,
What is the error you are seeing when installingcom.github.PhilJay:MPAndroidChart:v3.1.0?
It'd be great if you could run gradle with the--infoflag. That way it'll provide a more detailed error message@mbwhite Can you run gradle with the '--info' flag as suggested above and please post the error message? Thanks!
@geoffduong I'll step in here, in the interest of fixing this problem quickly. Here's the output I get for gradle --info test:
> gradle --info test
Initialized native services in: /Users/nre/.gradle/native
The client will now receive all logging from the daemon (pid: 62936). The daemon log file: /Users/nre/.gradle/daemon/5.6.2/daemon-62936.out.log
Starting 2nd build in daemon [uptime: 15.038 secs, performance: 98%, non-heap usage: 15% of 268.4 MB]
Using 4 worker leases.
Starting Build
Settings evaluated using settings file '/Users/nre/Code/AbletonDevTools/project-name/settings.gradle'.
Projects loaded. Root project using build file '/Users/nre/Code/AbletonDevTools/project-name/build.gradle'.
Included projects: [root project 'project-name']
> Configure project :
Evaluating root project 'project-name' using build file '/Users/nre/Code/AbletonDevTools/project-name/build.gradle'.
All projects evaluated.
Selected primary task 'test' from project :
Tasks to be executed: [task ':compileJava', task ':compileGroovy', task ':processResources', task ':classes', task ':compileTestJava', task ':compileTestGroovy', task ':processTestResources', task ':testClasses', task ':test']
:compileJava (Thread[Execution worker for ':',5,main]) started.
> Task :compileJava NO-SOURCE
file or directory '/Users/nre/Code/AbletonDevTools/project-name/src/main/java', not found
Skipping task ':compileJava' as it has no source files and no previous output files.
:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.007 secs.
:compileGroovy (Thread[Execution worker for ':',5,main]) started.
> Task :compileGroovy FAILED
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://www.jitpack.io/com/github/AbletonDevTools/jenkins-pipeline-mocks/maven-metadata.xml)]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/AbletonDevTools/jenkins-pipeline-mocks/maven-metadata.xml]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/com/github/AbletonDevTools/jenkins-pipeline-mocks/]
:compileGroovy (Thread[Execution worker for ':',5,main]) completed. Took 1.725 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve com.github.AbletonDevTools:jenkins-pipeline-mocks:0.7+.
Required by:
project :
> Failed to list versions for com.github.AbletonDevTools:jenkins-pipeline-mocks.
> Unable to load Maven meta-data from https://www.jitpack.io/com/github/AbletonDevTools/jenkins-pipeline-mocks/maven-metadata.xml.
> Could not get resource 'https://www.jitpack.io/com/github/AbletonDevTools/jenkins-pipeline-mocks/maven-metadata.xml'.
> Could not GET 'https://www.jitpack.io/com/github/AbletonDevTools/jenkins-pipeline-mocks/maven-metadata.xml'. Received status code 401 from server: Unauthorized
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
1 actionable task: 1 executed
Here's our build.gradle file:
apply plugin: 'groovy'
repositories {
mavenCentral()
maven {
url 'https://www.jitpack.io'
}
}
dependencies {
compile 'com.github.AbletonDevTools:jenkins-pipeline-mocks:0.7+'
compile 'org.codehaus.groovy:groovy-all:2.4.12'
testCompile 'junit:junit:4.12'
testCompile(
group: 'com.lesfurets',
name: 'jenkins-pipeline-unit',
version: '1.0',
)
}
sourceSets {
main {
groovy {
srcDirs = ['src', 'vars']
}
}
test {
groovy {
srcDirs = ['test']
}
}
}
ping @jitpack-io, this issue is quite severe!
Same issue here, dependency not downloading anymore from android studio.
DNS inconsistency
jitpack.io. 3 IN A 104.24.22.62
www.jitpack.io. 5 IN A 149.56.28.39
Critical issue blocking our developers!
Hey guys, we've encountered this issue an hour ago and the solution was to remove the previous workaround ('www') and move it to the bottom of the repository list. - maven { url 'https://jitpack.io' }
it seems upgrading to gradle 3.5.1 (and latest android studio) fixed the problem... or maybe it's a coincidence
Tried with Studio v3.5.1, android-gradle 3.5.1 and gradle 5.4.1, it failed with below error-
Unable to load Maven meta-data from https://www.jitpack.io/com/github/xxx/xxx/dev-SNAPSHOT/maven-metadata.xml
Worked when used Studio v3.5.1, android-gradle 3.4.1 and gradle 5.2.1
Hi,
What is the error you are seeing when installingcom.github.PhilJay:MPAndroidChart:v3.1.0?
It'd be great if you could run gradle with the--infoflag. That way it'll provide a more detailed error message@mbwhite Can you run gradle with the '--info' flag as suggested above and please post the error message? Thanks!
Sorry been distracted with other work... the issue is acknowledged at least in the issue @alextrotsenko mentions above... they have at least responded to somebody on twitter as wel.
I'm trying to use BarChart and gradle buildings are fine but the xml files says "missing class" error for chart tag I'm using...

@helen-jiayuhan I don't see how this is related, but have you tried StackOverflow?
In addition, try Android Studio -> File -> Invalidate Caches -> Invalidate Caches and Restart. Tends to fix most A.S. problems.
@helen-jiayuhan I don't see how this is related, but have you tried StackOverflow?
In addition, try
Android Studio -> File -> Invalidate Caches -> Invalidate Caches and Restart. Tends to fix most A.S. problems.
sorry it's just something stupid with my AndroidStudio.... It just need to close the project and restart... Got me crazy for a long time to find this solution...
@geoffduong : I would like to reopen this issue. Today I just faced the same issue, can you please reopen it again.
Most helpful comment
ping @jitpack-io, this issue is quite severe!