gpt4 book ai didi

android - 如果 Gradle 覆盖传递依赖项,我可以忽略 "Incompatible Gradle Versions"lint 检查吗?

转载 作者:太空宇宙 更新时间:2023-11-03 13:45:13 25 4
gpt4 key购买 nike

我刚刚违反了这个 lint 检查:

Incompatible Gradle Versions ../../build.gradle: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.1, 25.2.0. Examples include com.android.support:animated-vector-drawable:25.3.1 and com.android.support:support-v13:25.2.0

我的一些传递依赖肯定没有更新到最新的支持版本。但是,我将支持库设置为一级依赖项,在我的应用程序 build.gradle 文件的最新版本中。我什至可以看到 Gradle 正在覆盖所有这些依赖项:

$ ./gradlew app:dependencies | grep 25.2.0

| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| +--- com.android.support:support-v13:25.2.0
| | +--- com.android.support:support-annotations:25.2.0 -> 25.3.1
| | \--- com.android.support:support-v4:25.2.0 -> 25.3.1 (*)
| \--- com.android.support:design:25.2.0 -> 25.3.1 (*)

有什么我需要担心的,或者我可以安全地忽略这个 lint 错误吗?

最佳答案

它没有覆盖所有依赖项:com.android.support:support-v13:25.2.0 没有更新到 25.3.1

您应该添加 compile "com.android.support:support-v13:25.3.1" 以确保所有内容都在同一版本上。

关于android - 如果 Gradle 覆盖传递依赖项,我可以忽略 "Incompatible Gradle Versions"lint 检查吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43622163/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com