Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't convert Java code to Kotlin in Android Studio

I'm trying to change a project's code base from Java to Kotlin. Doing this by right click on class/package and select Convert Java File to Kotlin File.

For most of the classes it works fine but for some the change doesn't happen and I don't get any error/warning message.

I'm using Android Studio 3.6.1

like image 559
petryk33 Avatar asked Apr 13 '26 16:04

petryk33


1 Answers

you keyboar shortcut ctrl+alt+shift+k for linux. I dont know about mac/windows. But you can check from file->settings->keymap "Convert Java File To Kotlin File". If you press the keyboard set inside java class, it automatically converts the whole class.

like image 170
Khamidjon Khamidov Avatar answered Apr 16 '26 05:04

Khamidjon Khamidov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!