android disable lint "unused declaration" for entire project -


in android library project have many unused declarations, cause called outside of project. use lint via

analyze -> inspect code

i dont want use

@surpresswarning("unused") 

on each file.

if try disable same id in gradle file

android {     lintoptions {         disable 'unused'     } } 

the linter still comes "unused declaration" errors

i tried creating lint.xml file in project root

<?xml version="1.0" encoding="utf-8"?> <lint>     <!-- list of issues configure -->     <issue id="unused" severity="ignore" />  </lint> 

but still doesn´t work. know correct lint id?

you can use analyze -> inspect code, right-click in 1 of warnings. see there option called "disable inspection":

inspect code dialog

just click on , won't need worry unused declarations in project anymore.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -