0

I am a bit new in android development and sorry if I am using wrong terminology anywhere. The problem I am facing is I have added two third-party packages which is using a same dependency internally. These packages are being used for separate purposes.

The errorLogs are:

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.realsil.sdk.core.base.BaseService found in modules jetified-crpblelib-1.7.4-runtime (:crpblelib-1.7.4:) and jetified-libraryDfu8762C_v2.0.4-runtime (:libraryDfu8762C_v2.0.4:)
     Duplicate class com.realsil.sdk.core.bluetooth.connection.BluetoothClient found in modules jetified-crpblelib-1.7.4-runtime (:crpblelib-1.7.4:) and jetified-libraryDfu8762C_v2.0.4-runtime (:libraryDfu8762C_v2.0.4:)
     Duplicate class com.realsil.sdk.core.bluetooth.connection.le.BluetoothGattClient found in modules jetified-crpblelib-1.7.4-runtime (:crpblelib-1.7.4:) and jetified-libraryDfu8762C_v2.0.4-runtime (:libraryDfu8762C_v2.0.4:)
     Duplicate class com.realsil.sdk.core.bluetooth.connection.le.BluetoothGattClient$a found in modules jetified-crpblelib-1.7.4-runtime (:crpblelib-1.7.4:) and jetified-libraryDfu8762C_v2.0.4-runtime (:libraryDfu8762C_v2.0.4:)
     Duplicate class com.realsil.sdk.dfu.DfuService found in modules jetified-crpblelib-1.7.4-runtime (:crpblelib-1.7.4:) and jetified-libraryDfu8762C_v2.0.4-runtime (:libraryDfu8762C_v2.0.4:)
     ...

     Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

Since, they are AAR packages, I am not able to exclude the common dependency using exclude. (Common dependency I figured out is https://mvnrepository.com/artifact/com.realsil.sdk/rtk-core/1.0.5) Please let me know if there is a way to solve this.

0 Answers0