在不禁用Lint的情况下绕过AndroidX迁移错误
现在Android迫使开发者迁移到AndroidX,所以我得到了这个lint错误在不禁用Lint的情况下绕过AndroidX迁移错误,android,gradle,migration,androidx,lint,Android,Gradle,Migration,Androidx,Lint,现在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 {
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
}
}
谢谢@shmakova,我正在寻找第一个答案!!