0

In my android app, it takes approximately more than 3 minutes to build the app. If I browse through the build tasks one by one, I noticed that app:lintDebug takes the considerable amount of minutes (more than 1 minute)

It is quite annoying and i was aware to disable lint check , by putting these settings

lintOptions { tasks.lint.enabled = false quiet false abortOnError false ignoreWarnings false warningsAsErrors true checkReleaseBuilds false } 

Also in the top of the file

tasks.whenTaskAdded { task -> if (task.name == "lint") { task.enabled = false } } 

Also I have checked the offline Gradle build aswel.

But yet

enter image description here

Is there any others settings that i need to put to stop this?

3 Answers 3

1

Actually build time depends on your module count. I give you some advice which use on my project(7 module)

  • Disable Instant Run.
  • Configure Gradle and here
  • If you use DexGuard or ProGuard, turn off while debug build.
  • If you use Crashlytics, check library version. It may be cause negative effect.
Sign up to request clarification or add additional context in comments.

Comments

0

Try to work on offline mode after adding dependencies.If you want to add more dependencies just disable offline mode add dependency and then again enable offline mode. This will save a lot of your build time.I am working on a large project where build time on online mode is almost an hour while on offline mode it took some minutes to build.

To enable or disable offline mode go to: -> File -> Settings -> Build,Execution,Development -> Gradle -> Checked or unchecked offline work 

1 Comment

Already its in offline mode, my question is why does the lint checks even if its disabled . Updated the question.
0

Finally i got it done by using a different task name , the gradle build for lint check has placed as lintDebug instead of lint updated skipping lint check should placed as follow

tasks.whenTaskAdded { task -> if (task.name == "lintDebug") { task.enabled = false } } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.