Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

android - Fabric maven repo causes slow gradle builds

After upgrading from using the Crashlytics maven repo to the new Fabric maven repo and gradle plugin, my gradle builds have become incredibly slow.

The problem seems to be caused by the Fabric maven repo returning a 401 unauthorized error whenever gradle tries to resolve a dependency:

Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/recyclerview-v7/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/appcompat-v7/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/support-v4/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/google/android/gms/play-services/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/support-annotations/21.0.2/support-annotations-21.0.2.pom]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/mediarouter-v7/19.0.1/mediarouter-v7-19.0.1.pom]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/support-annotations/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/recyclerview-v7/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/appcompat-v7/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/android/support/support-v4/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 401 Unauthorized: https://maven.fabric.io/repo/com/google/android/gms/play-services/maven-metadata.xml]

The old Crashlytics maven repo did not return these results.

Has anyone had a similar error, or found a fix?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Hemal from Fabric here.

Find this in build.gradle (should be 2 instances):

?maven { url 'https://maven.fabric.io/repo' }

and replace with:

maven { url 'https://maven.fabric.io/public' }


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...