现在,Android迫使开发人员迁移到AndroidX,所以我遇到了这个皮棉错误。
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
}
}