30

how fix warning? Kotlin version that is used for building with Gradle (1.5.0) differs from the one bundled into the IDE plugin (1.5.0-release-764)

after create new project and after fix error (change 1.5.0-release-764 to 1.5.0)

Simple Solve: Just Update Kotlin plugin!

Fortran
  • 2,218
  • 2
  • 27
  • 33
  • Does this answer your question? [Can't create new Kotlin project after updating to Android Studio 4.2](https://stackoverflow.com/questions/67400029/cant-create-new-kotlin-project-after-updating-to-android-studio-4-2) – Ananiya Jemberu May 08 '21 at 09:19
  • 1
    @AnaniyaJemberu no – Fortran May 08 '21 at 09:22
  • ok well you can ignore it it wont affect your project – Ananiya Jemberu May 08 '21 at 09:31
  • It's fixed in Android Studio 4.2.1: https://androidstudio.googleblog.com/2021/05/android-studio-421-available.html – Martin Marconcini May 14 '21 at 07:24
  • 1
    @MartinMarconcini, how do you mean it is fixed? Android Studio still generates the same warning the OP is asking about. – Dan Abnormal May 15 '21 at 21:13
  • Creating a new project in Android Studio 4.2.1 does not put the _incorrect_ kotlin version. The warning will/should not go away, what is fixed is Android Studio making the mistake when creating a new project, instead of the you, the user, having to fix it. – Martin Marconcini May 16 '21 at 13:20
  • 1
    I've started a new project with 4.2.1 and it still gives this warning. Still it is a warning that can be ignored I guess. – mcy May 17 '21 at 08:25
  • 4
    The warning is fixed in the upcoming Kotlin plugin 1.5.10, which is not released yet I believe. So for the moment it looks like we have to live with this warning. – hdort May 17 '21 at 10:51

3 Answers3

6

I think you can ignore this one. I believe this bug will be fixed soon anyway, which should fix this warning too.

ChocolateChapta
  • 148
  • 2
  • 11
5

According to the comments here https://issuetracker.google.com/issues/187403740 the issue will be fixed with Kotlin 1.5.10: https://youtrack.jetbrains.com/issue/KTIJ-7657

narko
  • 3,645
  • 1
  • 28
  • 33
-2

change to

dependencies {
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0"
}