I have an android app on gradle. The structure of the project is as follows:
project
libs
ActionBarSherlock
src
AndroidManifest.xml
DragSortListView
src
AndroidManifest.xml
PhotoView-1.2.2
src
AndroidManifest.xml
app
build
libs
src
main
assets
java
jniLibs
res
AndroidManifest.xml
lint.xml
I run Lint in my project as follows:
lint app/src/ --config lint.xml --html app/build/lint/report.html
This successfully generates a lint report, but the report contains a warning package
"UnusedResources: Unused resources"
main/res/drawable/my_drawable.xml: The resource R.drawable.my_drawable appears to be unused
In fact, Lint marks every resource that I can access only through the R file. For example, if I have my_layout.xml, which I use in another xml via @ layout / my_layout, everything will be fine. But if I access them only from java code through an R file, for example, R.layout.my_layout lint marks it as "unused"
I tried adding Lint to the input folder with the generated R file from my build directory, like this
lint app/src/ app/biuld/sources/ --config lint.xml --html app/build/lint/report.html
but it does not affect.
Any thoughts and suggestions what's wrong with my line?