I am using log4j in an Android project, a dependency defined in the gradle project as:
compile 'log4j:log4j:1.2.16'
When the Lint check occurs, the analyzer 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 the library; not included in Android: java.awt. Link 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 the library; not included in Android: java.awt.event. Link to org.apache.log4j.chainsaw.Main. 1.
....
How can I fix this better? Lint suggests suppressing this warning by id, but that means suppressing all warnings by type, am I right? This doesn't seem to be the best solution ... Maybe some way to tell lint not to check the log4j package?
source
share