-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
androidbugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing code
Description
Description
Using log4j2 v2.24.0 (api and core) with Android throws error:
I/com.example: Caused by: java.lang.ClassNotFoundException: Didn't find class "java.lang.management.ManagementFactory" on path: DexPathList[[zip file "/data/app/~~MLF2ZshZzBIhJrgJjHw41g==/com.example-3Fbkjvp4obnGh8xK-dY_6A==/base.apk"],nativeLibraryDirectories=[/data/app/~~MLF2ZshZzBIhJrgJjHw41g==/com.example-3Fbkjvp4obnGh8xK-dY_6A==/lib/x86, /data/app/~~MLF2ZshZzBIhJrgJjHw41g==/com.example-3Fbkjvp4obnGh8xK-dY_6A==/base.apk!/lib/x86, /system/lib, /system_ext/lib]
gradle settings:
implementation ('org.apache.logging.log4j:log4j-api:2.24.1'){
exclude group: 'com.sun.jmx', module: 'jmx'
exclude group: 'javax.management'
}
implementation 'org.apache.logging.log4j:log4j-core:2.24.1'
Configuration
Version: 2.24.0
Operating system: Android SDK34
JDK: 1.8
Logs
I/com.example: Caused by: java.lang.ClassNotFoundException: Didn't find class "java.lang.management.ManagementFactory" on path: DexPathList[[zip file "/data/app/~~MLF2ZshZzBIhJrgJjHw41g==/com.example-3Fbkjvp4obnGh8xK-dY_6A==/base.apk"],nativeLibraryDirectories=[/data/app/~~MLF2ZshZzBIhJrgJjHw41g==/com.example-3Fbkjvp4obnGh8xK-dY_6A==/lib/x86, /data/app/~~MLF2ZshZzBIhJrgJjHw41g==/com.example-3Fbkjvp4obnGh8xK-dY_6A==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
Metadata
Metadata
Assignees
Labels
androidbugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing code