'How to use different kotlin library versions in each android module?
A project has multiple modules, two of which are named :app and :prefs.
The project build.gradle,
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
and :app build.gradle,
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3"
...
implementation project(":prefs")
work fine. However, the :prefs library requires the latest coroutine features,
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0"
but the following error occurs:
jetified-kotlinx-coroutines-android-1.6.0.jar!/META-INF/kotlinx-coroutines-android.kotlin_module:
Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.13.
Is it possible to have separate versions of the same dependency ... one in each module?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
