Search code examples
androidgradle

Failed to resolve some libraries after gradle update


After upgrading Gradle from 7.4 to 8.5, these libraries can't be resolved. It works fine on 7.4. What could be causing the issue?"

From distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip

To distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip

enter image description here


Solution

  • JCenter discontinued distributing artifacts a couple of months ago.

    • com.jwang123.flagkit:flagkit has not been updated in 8 years, and it presumably was only distributed via JCenter
    • com.android.volley:volley:1.1.0 was only distributed on JCenter, and it was replaced by 1.2.1 3 years ago (distributed by Google's own Maven)
    • com.amulyakhare:com.amulyakhare.textdrawable has not been updated in 10 years, and presumably it was only distributed via JCenter
    • com.github.barteksc:android-pdf-viewer has not been updated in 7 years, and presumably it was only distributed via JCenter

    The reason this is coming to a head now is because of JCenter's shutdown and your Gradle cache presumably being cleared.

    FWIW, I wrote more about this situation in my blog.