Remove/upgrade the newly added sdk dependency from your project Restart the Kotlin plugin and restart the Android Studio Offline work mode should be turned OFF in the Gradle settings options, For example you have added some sdk dependency in your project which was compiled with different (incompatible) kotlin version than your app is using. From the error statement it seems the module was compiled with an incompatible version of Kotlin.Incompatible Gradle distribution version wrt Gradle plugin (:gradle). Updated Android Studio stop supporting older Kotlin version.Offline work mode is ON in the Gradle settings options which failing some dependencies while compilation. Recently my Jenkins build was failing with similar lines of error messages. The rule here is to choose a ktx version whose release date is close to the release date of KGP. In gradle-wrapper.properties distributionUrl=https\:///distributions/gradle-5.4.1-all.zip Implementation "re:core-ktx:1.6.0" // not compatible with kotlin_version = '1.3.40' In adle (Module) // implementation "re:core-ktx:1.2.0" // downgrading ktx fixes the issue ext.kotlin_version = '1.4.31' // upgrading KGP fixes the issueĬlasspath ':gradle:3.5.2'Ĭlasspath ":kotlin-gradle-plugin:$kotlin_version" In adle (Project) ext.kotlin_version = '1.3.40' // not compatible with ktx:1.6.0 To resolve the conflict, I had two options. So in my case, there was incompatibility between re:core-ktx and kotlin-gradle-plugin version. The expected version depends on the version of kotlin-gradle-plugin used in adle project file. In my case, I was using re:core-ktx:1.6.0 which depends on :kotlin-stdlib:1.5.10 The binary version 1.5.1 isn't the version of kotlin-stdlib used which can be known by examining the dependency tree. First, we need to know where the conflict comes from.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |