androidkotlinandroid-studio

How to upgrade the Kotlin version in an existing android studio project?


I am trying to upgrade my Gradle Plugin version (stuck at verions 8.5.1) (I have the lateste 234 version of Android Studio installed, using Windows 11). The automatic upgrader fails, as my Kotlin version 1.9 (with JVM 1.8) is too old, and does not support any grader plugin older than 8.5. So I checked the documentation to upgrade the Kotlin version. It seemed to be exactly what I wanted, with one little exception. You cannot upgrade the Kotlin version if you have an old Gradle plugin version.

So we have a circular requirement. Does anybody know any hack or tip to get around this problem?

I tried to search the internet for a solution to no avail.

edit: Solved finally. The trick to solve the circular dependencies is to ignore android studio atuomatic upgraders and the Kotlin upgrade strategies other people have posted in StackOverflow. and manually upgrade everything at the same time. Steps for solving it are:


Solution

  • Solved finally. The trick to solve the circular dependencies is to ignore android studio atuomatic upgraders and the Kotlin upgrade strategies that other people have posted in this StackOverflow. and manually upgrade everything at the same time. Steps for solving it are: