0

basically i am using log4j library and one of their class supports minSdk 26 and currently i am using minSdk 21 but the problem is i cannot upgrade minSdk version to 26 .

So is there any way to compatible midSdk 21 to 26 .. Any help would be appreciated

> Task :app:mergeExtDexQueueBusterAPPDebug
AGPBI: {"kind":"error","text":"com.android.tools.r8.a: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)","sources":[{"file":"/Users/jayantkumar/.gradle/caches/transforms-2/files-2.1/375628e22970e0d2f8484ffb87595408/jetified-log4j-api-2.19.0.jar"}],"tool":"D8"}
Jayant Kumar
  • 775
  • 5
  • 12
  • Related: https://developer.android.com/studio/write/java8-support but why are you using log4j? Is that needed for third-party libraries? – Morrison Chang Feb 27 '23 at 06:57
  • yes i need that library for storing logs data – Jayant Kumar Feb 27 '23 at 07:06
  • From my link, did you try "To keep using that library with minSdkVersion 25 or lower, enable code shrinking to remove unused methods." If that doesn't work I would look to see if there Android compatible log4j library rather than the Java SE main library. – Morrison Chang Feb 27 '23 at 07:18
  • i tried that thing but still no result – Jayant Kumar Feb 27 '23 at 07:25
  • You should explain why are you using log4j rather than something Android specific. Related: [log4j support in Android](https://stackoverflow.com/q/2915150/295004) – Morrison Chang Feb 27 '23 at 07:29

0 Answers0