Wish Request for Automatic Library Conflict Resolution in B4A

Mehrzad238

Active Member
Hi @Erel ,

I'm encountering an issue with B4A when using two libraries simultaneously. The error log indicates that the `okhttp3.Address` type is defined multiple times due to conflicting versions of the OkHttp library. Here is the relevant part of the error:

B4X:
Dex merge    Error
Error in f:\sdk3\tools\..\extras\b4a_local\unpacked-amir_retrofit-63685737623860\jars\okhttp-3.12.1.zip:classes.dex:
Type okhttp3.Address is defined multiple times: f:\sdk3\tools\..\extras\b4a_local\unpacked-amir_retrofit-63685737623860\jars\okhttp-3.12.1.zip:classes.dex, F:\SDK3\tools\..\extras\b4a_local\unpacked-okhttp-4.9.0-63872342718000\dex_v1\okhttp-4.9.0.zip:classes.dex

I can resolve this issue by manually deleting the duplicate OkHttp library from the AAR file. However, I would appreciate it if the compiler could handle this automatically, as it would save significant time and effort.

Would it be possible to automatically add a feature to the B4A compiler to manage these types of conflicts? Your help would be greatly appreciated.

This is happening in the B4A and B4X project

Thank you for your support and all the hard work you put into B4X.

Best regards,
@Mehrzad238
 

Attachments

  • Screenshot 2025-01-24 223624.png
    Screenshot 2025-01-24 223624.png
    331 KB · Views: 11
Top