Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut for "Convert java code ( not file) to Kotlin

In Android studio, When you copy java code to Kotlin file, you see a dialog

enter image description here

I need help to know if I select "Don't show dialog" how can i re-enabled it. I can't find settings in studio unfortunately :(

like image 629
Connecting life with Android Avatar asked Mar 04 '26 10:03

Connecting life with Android


2 Answers

command shift A (Mac) or ctrl shift A in Windows and Linux to invoke find action dialogue.

Type convert pasted java code

enter image description here

If it is off, press enter.

like image 87
aristotll Avatar answered Mar 06 '26 02:03

aristotll


@aristotll's answer gives you what you want!

If you want to convert an existing file:
- Menu: Code > Convert Java File to Kotlin File
- Win: Ctrl+Alt+Shift+K
- Mac: ++Shift+K

like image 38
charles-allen Avatar answered Mar 06 '26 02:03

charles-allen



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!