teads / TeadsSDK-android

Teads SDK for Android - Premium branded "outstream" ads
13 stars 6 forks source link

META-INF/sdk_prodRelease.kotlin_module #211

Closed github-lucas-bon closed 2 months ago

github-lucas-bon commented 1 year ago

When implementing Teads SDK, if you are adding dependencies that share their module final path name and build type name and you are using Gradle Android Plugin version <= 4.2.2 you might face a build error related to META-INF/sdk_prodRelease.kotlin_module, which indicates duplicates on META-INF files.

Example:

Library 1 Library 2
Module name teads.tv.sdk com.adcolony.sdk
Build type name prodRelease prodRelease

For this issue we don't recommend you to solve with packingOptions since it could remove classes from one of the libraries.

The best way known so far to solve it is by upgrading your Gradle Android Plugin version to >= 7.0.0, then Gradle is able to handle correctly different libraries that shares the similarities showed above.

See that this is rather a problem regarding how Gradle manage dependencies on your project then a problem with the libraries themselves.

github-lucas-bon commented 2 months ago

New min gradle plugin version is now 4.2.2