Dependency conflicts

Gradle Transitive Dependency conflicts and MXO

The Medallia Experience Orchestration Android SDK is tested for quality with various versions of common libraries. Examples include the Kotlin standard library, various Jetpack Libraries, and open-source libraries like Retrofit. To ensure the correctness of the MXO Android SDK when integrated with Android Apps that may use these libraries, the MXO Android SDK declares a strict range of supported versions of these common libraries with a request to use a preferred version if possible. This is accomplished through Gradle's Version Constraints.

When Gradle cannot find a version of a library that satisfies all constraints an error will be thrown during compilation. This means that various libraries cannot agree on some dependency that they all use and can therefore not guarantee Runtime correctness. Though this error can be daunting to see, it is a good thing as it prevents an App from crashing on users at Runtime by forcing developers to fix the issue at compile time.

Gradle provides various mechanisms for resolving dependency conflicts as mentioned in Upgrading versions of transitive dependencies. If the dependency is a first-party dependency listed in your build.gradle(.kts) file, IE is not a transitive dependency, the simplest solution is to downgrade your version to a valid version if it does not impact your application's functionality. If the dependency in conflict is a transitive (IE not declared in your build.gradle(.kts)) then you must take care to investigate if it's possible to downgrade the dependency using Gradle strict versioning. This will require you to test your application with the downgraded version or to reach out to the developers of the library that uses the transitive dependency.

If you find that you cannot find a compatible downgraded version of a transitive dependency that MXO uses, open contact support to investigate if it ts possible to force the downgrade/upgrade or if a hotfix is required.