Android Studio 表示(在 gradle 文件中)有更新版本的库

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

Android 工作室表示:

“比 2.8 更新的 com.squareup.picasso:picasso 版本可用:2.71828”

Screenshot from Android Studio

但我看到 2.8 是 https://github.com/square/picasso/releases 上的最新版本。

我的 Gradle 项目构建脚本:

// 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
}

我猜 Gradle 看起来不在 GitHub 上,而是在其他存储库上?如果是,我是否应该改变

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

类似于

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

或者我应该改为:

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

这是他们 GitHub

上的一个已知问题

如前所述:

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.

所以保持原样。

如果真的很困扰您,您可以这样做来抑制警告:

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