I am encountering an issue related to R8 ofuscation in my app application. During the build process, I receive the following error message:
AGPBI: {"kind":"warning","text":"The following library types, prefixed by java., are present both as library and non-library classes: java.util.LinkedHashMap, java.util.HashMap, java.util.AbstractMap, java.util.AbstractList, java.util.AbstractCollection, java.util.IdentityHashMap, java.util.ArrayList, java.util.LinkedList, java.util.Hashtable, java.util.concurrent.ConcurrentLinkedQueue, java.util.AbstractQueue, java.util.Vector, java.util.HashSet, java.util.AbstractSet, java.util.WeakHashMap", "sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"Library class java.util.LinkedHashMap implements program class java.util.Map", "sources":[{}],"tool":"R8"}
AGPBI: {"kind":"error","text":"Library class java.util.HashMap implements program class java.util.Map", "sources":[{}],"tool":"R8"}
Screenshot about the build process
Any know how I can fix the problem ?
I tried to set proguard rules for keeping package name but the error persist
I use this command for keeping clases
-keep class java.io.UncheckedIOException { *; }
-keep class java.lang.Iterable { *; }
-keep class java.time.Clock { *; }
-keep class java.time.DateTimeException { *; }
-keep class java.util.LinkedHashMap { *; }
-keep class java.util.Map { *; }
-keep class java.util.IdentityHashMap { *; }
-keep class java.util.LinkedHashMap implements java.util.Map