现在,Android迫使开发人员迁移到AndroidX,所以我遇到了这个 Lint 错误。
Caused by: org.gradle.api.GradleException: Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
build.gradle:31: Error: so we recommend that you migrate to AndroidX libraries when using Android Q and moving forward. The IDE can help with this: Refactor > Migrate to AndroidX... [GradleCompatible]
implementation 'com.android.support:design:28.0.0'
因此,我想绕过此检查而不进行其他错误处理。
我知道我可以使用lint禁用特定规则,但是找不到可以克服此问题(迁移到AndroidX)的规则。
谢谢。
最佳答案
您可以像这样抑制此错误:
//noinspection GradleCompatible
implementation 'com.android.support:design:28.0.0'
或者,您可以将其添加到build.gradle文件中:
android {
lintOptions {
abortOnError false
}
}
关于android - 绕过AndroidX迁移错误而不禁用Lint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60615293/