0

I have to move log4j1.2.17 to log4j2.8.2. I did the below changes in android build.gradle for log4j2 implementation.

implementation 'org.apache.logging.log4j:log4j-core:2.8.2'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.2'
implementation 'org.apache.logging.log4j:log4j-1.2-api:2.8.2'

Also as explained in some of the stackoverflow, I made the proguard changes as stated below:

#log4j2
-dontwarn org.apache.logging.log4j.**
-keepattributes Signature
-keep class org.apache.logging.log4j.** { *; }

After building the project using maven, below is the stacktrace:

[INFO] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in org.apache.logging.log4j.core.config.plugins.convert.DateTypeConverter.fromMillis:(JLjava/lang/Class;)Ljava/util/Date;: invoking a signature-polymorphic requires --min-sdk-version >= 26 (currently 13) [INFO] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in org.apache.logging.log4j.core.impl.ContextDataFactory.createContextData:()Lorg/apache/logging/log4j/util/StringMap;: invoking a signature-polymorphic requires --min-sdk-version >= 26 (currently 13)

I tried so many solution from stackoverflow, couldnt find exact solution for the same. Below are the links:

ProGuard SimException

SimException on proguard build, Android Studio?

Please suggest any solution which could me help me to resolve the above issue. Thanks !

prat
  • 597
  • 8
  • 17

1 Answers1

0

After digging a lot, I got to know the issue is not with the proguard.Then I ended up saving logcat to a text file as stated in the below link:

Link

Hope this helps others.

prat
  • 597
  • 8
  • 17