Search code examples
androidandroid-studiogradlebuild.gradlepicasso

Android Studio says (in gradle file) that there is newer version of library


Android studio says that:

"A newer version of com.squareup.picasso:picasso than 2.8 is available: 2.71828"

Screenshot from Android Studio

but I see that 2.8 is the newest version on https://github.com/square/picasso/releases.

My Gradle build script for Project:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.1'
        classpath 'com.google.gms:google-services:4.3.4'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

I guess that Gradle looks not on GitHub, but on some other repository? If yes, should I change

implementation 'com.squareup.picasso:picasso:2.8'

to something like

implementation 'com.github.square:picasso:2.8'

or should I change to:

implementation 'com.squareup.picasso:picasso:2.71828'

Solution

  • This is a known issue on their GitHub

    As stated:

    Updated Picasso version 2.71828 to 2.8. Now Android Lint complains that there is a newer version 2.71828 available. Which is true in semantic versioning sense since 71828 > 8.

    One can suppress the GradleDependency lint check for the library to get rid of the warning. However, I would find it better if version number components were monotonically increasing instead.

    So leave it as is.

    If it really bothers you, you can do this to suppress the warning:

    //noinspection GradleDependency
    implementation 'com.squareup.picasso:picasso:2.8'