I need to include two aar libraries in my project (say hello.aar and world.aar). Both of then contains a jar file but of different version (say foo.jar:v1.0 and foo.jar:v2.0)
When I created a debug build, it worked fine.
When I created a release build, I got this error.
Duplicate zip entry [foo.1.1.jar:com/foo/BuildConfig.class]
I noticed that error goes away when I remove minifyEnabled true
from gradle.
I added -keep class com.foo.** { *; }
and still got the same error.
I don't want to remove minification from release build. How do I fix it ?
Note: I can't exclude foo.jar from any of the aar file because it will break the aar file.