Duplicate class found in modules with R8 enabled

170
August 16, 2019, at 6:50 PM

I created two aar-libraries: com.example:test1:1.0.0 and com.example:test2:1.0.0. I added these libs to my main app and after build Android-Studio throws error:

Duplicate class com.example.utils.a found in modules classes.jar (com.example:test1:1.0.0) and classes.jar (com.example:test2:1.0.0)

I find out that this error happens because both libraries have classes in same package (com.example.utils) and after obfuscation R8 creates classes (a.class) with same full name (I saw this in classes.jar of aar). If I disable R8 in properties of my libs this error has gone.

'a' is not library class: after obfuscation all library classe names remain unchanged and a.class was added in package additionaly by R8. I read R8 documentation and found nothing about this problem. Are there any ways to solve this issue without ranaming the package in one of my libs?

Rent Charter Buses Company
READ ALSO
How to decrypt signal protocol message sent from node in android - java

How to decrypt signal protocol message sent from node in android - java

I'm setting up a connection between a laptop and an android phone with socketIOI wanted the messages to be encrypted with signal protocol, and so far I've been able to start a session and send a message from the phone to the laptop and decrypt it

141
Deside the host before connecting with WiFi Direct

Deside the host before connecting with WiFi Direct

How can you decide which phone would be the Group Owner of the Direct Network before connecting to it in Android Studio?

135
Java reference to activity

Java reference to activity

i have non-Activity class QtAdMobBanner that store reference to main Activity (simplified code below), why reference that set once at initialization still valid after activity created/destroyed (ActivityLifecycleCallbacks still work)?

176
How Do I add attendees to a Calendar intent?

How Do I add attendees to a Calendar intent?

I'm creating an intent to share and open with the default calendar appI want to add an attendee email, but can't find how it's done

156