Sometimes I see a pop-up, that I can migrate to a newer kotlin version or something but I recently accidentally closed it and after restarting Android Studio it doesn’t appear again. How can I run that migrations manually? Because, when I download a random project from GitHub I sometimes get compilation errors if something is not updated.
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
I was able to make the pop-up appear again, try the following:
kotlin_version
on your build.gradle to whatever version of Kotlin you were before or want to migrate from.You can create a custom inspection profile to check if your code requires Kotlin migration. Go to bottom toolbar – Problems – Project Errors – Inspect Code (alternatively, Code – Inspect code… in the app bar), press 3 dots next to existing inspection profile, duplicate that existing profile, select only Kotlin – Migration for this new profile and run an inspection for it.