Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

convert java file to kotlin file disabled in Android studio 3.3

After updating android studio 3.3 canary 7 convert java file to kotlin file is showing disable.

Android Studio Menu -> Code -> Convert Java File to Kotlin File

Its showing disable. Why it is disable and how can i enable it android studio latest version.

like image 352
0xAliHn Avatar asked Aug 29 '18 06:08

0xAliHn


3 Answers

Open your File and press

Ctrl + Alt + Shift + K

Converting Java Code to Kotlin Code :

  • Select your java class file from project structure.
  • Android Studio Menu -> Code -> Convert Java File to Kotlin File
like image 167
Kishan Viramgama Avatar answered Oct 16 '22 13:10

Kishan Viramgama


Go to Tools -> Kotlin -> Configure Kotlin in Project to set up again.

like image 1
Lankaka Avatar answered Oct 16 '22 11:10

Lankaka


This is a bug in the Kotlin plugin: https://youtrack.jetbrains.com/issue/KT-26298 . Please update your IDE plugin version to 1.2.61, the problem is fixed there.

like image 1
Alexey Belkov Avatar answered Oct 16 '22 11:10

Alexey Belkov