Answer the question
In order to leave comments, you need to log in
How to disable lint and all warnings when building an android project?
I am working on a large project and faced with the fact that Android Studio builds the project for a very long time, sometimes it takes up to 4-5 minutes. At the same time, this is not a cold build, it happens that I will only make a couple of fixes in the xml markup or add a couple of lines of code and the project seems to be rebuilt on a new one. After lengthy builds, a bunch of warnings fall out with the note "that you have Deprecated there, but here you have Unused Resourses". The number of warnings in the project is more than 1000 pieces. Approximate content:
Parameter 'age' is never used, could be renamed to _
This is a delicate API and its use requires care.
'getColor(Int): Int' is deprecated. Deprecated in Java
'constructor Handler()' is deprecated. Deprecated in Java
lintOptions {
checkOnly 'NewApi', 'HandlerLeak'
checkReleaseBuilds false
abortOnError false
checkAllWarnings false
ignoreWarnings true
quiet true
tasks.lint.enabled = false
checkDependencies false
}
tasks.whenTaskAdded { task ->
if (task.name.equals("lint")) {
task.enabled = false
}
}
org.gradle.jvmargs=-Xms1024m -Xmx4096m -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC
org.gradle.daemon=true
org.gradle.configureondemand=false
org.gradle.caching=true
org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
Android Studio Arctic Fox | 2020.3.1 Patch 3
Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
Answer the question
In order to leave comments, you need to log in
Check what slows down, and do not guess.
Build Analyzer
On the overview tab, it will show the main plug where.
On the tasks tab, you can see about each
The error was that the project was in a directory called D:/[projects]/_frontend_/{project name}
As soon as I dragged it to a folder with a normal name, everything worked right away
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question