gpt4 book ai didi

android - 如何强制渲染脚本版本修复 lint 错误 : GradleCompatible

转载 作者:行者123 更新时间:2023-12-03 05:10:41 26 4
gpt4 key购买 nike

我使用的所有支持库都有版本:26.1.0,甚至那些来自 3rd 方依赖项的支持库也强制使用 resolutionStrategy 到 26.1.0

在 build.gradle 我有:

compileSdkVersion 26
buildToolsVersion 26.0.3
renderscriptTargetApi 16
renderscriptSupportModeEnabled true

./gradlew app:lint 给我以下错误:

../../build.gradle: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 26.1.0, 26.0.3. Examples include com.android.support:animated-vector-drawable:26.1.0 and com.android.support:renderscript:26.0.3



由于 renderscript 不是一个普通的库,它甚至没有出现在依赖树中,我无法使用 resolutionStrategy 强制它。

有没有办法解决这个问题(除了设置 lintOptions {warning 'GradleCompatible'} )?

最佳答案

如果您的目标是 SDK 版本 27,那么,
我假设您使用的是 Android Studio 3.0.1
首先,将 buildTools 版本更新为“27.0.3”。我认为他们已经在这个版本中解决了这个问题,因为我现在没有收到这样的 lint 错误:

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
...
}

和你的 SupportLibrary版本为 27.0.2
看看这是否有帮助。

关于android - 如何强制渲染脚本版本修复 lint 错误 : GradleCompatible,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48039674/

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