Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/205.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在不禁用Lint的情况下绕过AndroidX迁移错误_Android_Gradle_Migration_Androidx_Lint - Fatal编程技术网

在不禁用Lint的情况下绕过AndroidX迁移错误

在不禁用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 {

现在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
    }
}

谢谢@shmakova,我正在寻找第一个答案!!