My gradle build completes successfully, but I get:
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.5.31` that
might work differently than in the requested version `1.6.10`.
All of my build.gradle.kts scripts refer to using version 1.5.31. The only association my project has with version 1.6.10 is that Android Studio has the Kotlin version 1.6.10 plugin added. If I try to disable that plugin, I get a message that several other plugins will be disabled. If I accept that, android studio crashes and will not start up again. It won't start up again even if you reinstall android studio again. The solution is to find the file named "disabled-plugins.txt" and delete that file. It's in your AppData folder and in a JetBrains subdirectory. It turns out that it's one or more of those other disabled plugins that prevents Android Studio from starting up again.
The question I have is how do I fix this version mismatch issue. I can't delete the plugin from Android Studio for the reasons I mentioned above. If I try to update my project to using version 1.6.10 I get literally 100's of unresolved dependencies. And it seems from opinionated investigation that 1.6.10 still have too many issues for general use.
By the way, when I look at the gradle window for the project I can see where the dependencies come from. Usually when I look at the gradle window I just see sub project folders that I can drill into for more information, but for this project, it has an additional folder name dependencies. I don't know how they get into my project. But when I look at their version numbers that's where the 1.6.10 mismatch happens.
So, I think I understand why the warning message is valid, I'm at a lost on what I need to do to correct this situation. For the moment, I'm just ignoring the warning, and so far I'm not finding any issues in proceeding that way. But that's means I'm proceeding, without an understanding of what's going on here! Sometimes that's okay and at other times that's a bad judgment The error message itself seems inverted. I would think that 1.6.10 is the embedded kotlin and kotlin-dsl since it an android studio plugin, but the error message seems to say it in the opposite way. So anyway, if someone can bring some clarity as to what's going on, and how I'm thinking wrongly about this problem would be greatly appreciated.
CodePudding user response:
I'll accept the following as the answer to what's going on about the unsupported kotlin version:
https://github.com/gradle/gradle/issues/13020
So, for the moment, I'll go on like this is just a nuisance warning and ignore that.
CodePudding user response:
What I just did was to re-create my Android Studio from a blank brand new project. I copied and pasted stuff from the previous project into the new project. I copied the source and build.script.kts files, so essentially everything is a copy of the disabandoned project. This new project didn't give me the WARNING message anymore. And in additional, I'm now able to upgrade my project to using kotlin 1.6.10, which I previously couldn't do because of the literally 100's of dependencies resolution issues. Whatever, that issue went away, and a lot of others things started working as expected once I recreated the project. I can't say what got my project into that weird state. Deleting the .gradle and .idea folders, wouldn't fix the problem. I didn't try deleting the JetBrains cache, I wish I would have tried that.