Search code examples
androidtinylog

using tinylog 2.0


I try to use tinylog 2.0 on android, and I have a problem. Logger prints that error:

LOGGER WARN: No logging framework implementation found in classpath. Add tinylog-impl.jar for outputting log entries.

But in gradle file I have

implementation 'org.tinylog:tinylog-api:2.0.0-M3'
implementation 'org.tinylog:tinylog-impl:2.0.0-M3'

I don't use proguard, and flag minifyEnabled is false in Gradle

I found out that application can't load classes, because it can't find them. I don't understand, why classes are not in APK file


Solution

  • In tinylog 2.0.0-M3, there was a bug that caused a wrong class loader to be used for loading tinylog's service files. This bug was reported in another context as issue #96 and is fixed with tinylog 2.0.0-M4.

    Just update your dependencies:

    implementation 'org.tinylog:tinylog-api:2.0.0-M4'
    implementation 'org.tinylog:tinylog-impl:2.0.0-M4'