Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Gradle: what does "lintOptions abortOnError false" mean?

I wonder what mean the following lines :

buildTypes {
        lintOptions {
            abortOnError false
        }
    }

May you help ?

Is it recommended or not recommended to use these lines?

Thanks.

like image 427
Regis_AG Avatar asked Mar 19 '18 10:03

Regis_AG


People also ask

Where is the .gradle file android?

Located in the project/module directory of the project this Gradle script is where all the dependencies are defined and where the SDK versions are declared. This script has many functions in the project which include additional build types and override settings in the main/app manifest or top-level build.

What is settings gradle in Android?

The settings.gradle file, located in the root project directory, defines project-level repository settings and tells Gradle which modules it should include when building your app. For most projects, the file looks like the following by default: pluginManagement { /**

What is the purpose of the gradle in Android Studio and at what point can its content be modified?

Gradle is a general-purpose build toolGradle makes it easy to build common types of project — say Java libraries — by adding a layer of conventions and prebuilt functionality through plugins. You can even create and publish custom plugins to encapsulate your own conventions and build functionality.


1 Answers

Lint is a tool which helps to find potential bugs in the code, as well as checking code style, etc.

It can be either enabled or disabled for the project. If it is enabled, it will abort the app build when certain bigger issues are discovered. The "abortOnError" flag allows to ignore this error and continue with building the app.

Ideally, you would fix the error rather than suppress it. Suppressing using this flag could be useful for debug builds if you know that the error is there, but don't want to deal with it straight away, or maybe another team member is dealing with it, etc. However, it is marked as an error for a reason, so in general it's not really recommended to ignore them, especially for production builds.

like image 185
sigute Avatar answered Sep 27 '22 18:09

sigute