I use log4j in Android project, dependency defined in project gradle like:
compile 'log4j:log4j:1.2.16'
When Lint check happens, the analyser reports "InvalidPackage" errors:
../../../../../../../.gradle/caches/modules-2/files-2.1/log4j/log4j/1.2.17/5af35056b4d257e4b64b9e8069c0746e8b08629f/log4j-1.2.17.jar: Invalid package reference in library; not included in Android: java.awt. Referenced from org.apache.log4j.chainsaw.ControlPanel. ../../../../../../../.gradle/caches/modules-2/files-2.1/log4j/log4j/1.2.17/5af35056b4d257e4b64b9e8069c0746e8b08629f/log4j-1.2.17.jar: Invalid package reference in library; not included in Android: java.awt.event. Referenced from org.apache.log4j.chainsaw.Main.1.
....
How can I fix that the better way? Lint suggest to supress this warning by id, but this means supressing all warning by the type, am I right? This looks like not the best solution... Maybe some way to specify lint not to check the log4j package?