Shall I downgrade the installed version of Kotlin plugin in Android Studio?

125
April 29, 2022, at 5:40 PM

I am getting a warning as I build an Android Kotlin w/ Jetpack compose app with Android Studio like this:

Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
.../transformed/jetified-kotlin-stdlib-jdk8-1.5.31.jar (version 1.5)
.../transformed/jetified-kotlin-stdlib-jdk7-1.5.31.jar (version 1.5)
.../transformed/jetified-kotlin-stdlib-1.6.10.jar (version 1.6)
.../transformed/jetified-kotlin-stdlib-common-1.6.10.jar (version 1.6)

The Kotlin version I am using with my project is 1.5.31, since It is compatible with Compose compile version 1.0.5. The Kotlin plugin version installed on Android Studio is 1.6.10

Just for reference I am using Android Studio Bumblebee | 2021.1.1 Patch 1.

Shall I downgrade the plugin Kotlin version on Android Studio from 1.6.10 to 1.5.31? Or, just ignore the warning? Other solution?

Answer 1

This have nothing to do with the plugin version you have installed. Probably some dependency of yours have kotlin 1.6.10 dependency and that's why you hvae this conflict. Try to find out which one using dependency tree - my recommendation is to use gradle scan, you can read about it here. In gradle scan results you can go through all of your dependencies in a tree, like here. You have to find which library is using newer kotlin and then use older version of that library that's targeting your kotlin version

Rent Charter Buses Company
READ ALSO
Problem in Android AudioStream class in new API 32

Problem in Android AudioStream class in new API 32

The AudioStream class in API 32 is having a problem with the join method, what does it do together with the AudioGroup class, I just opened a call for Google but the same ones didn't help me, someone has the same problem or I've gone through something...

113
Checking the application loading speed on Android device

Checking the application loading speed on Android device

I have some web development experiences and today I started learning FlutterI made a really basic app, that displays a time in different countries

83
Difference between buffers in Kotlin flow

Difference between buffers in Kotlin flow

As far as I know there are three types of buffers in Kotlin flow: Buffer, Conflate and CollectLatest and I'm having trouble figuring out the differences between these three terminal operators

135