Why is "Decompile kotlin to java" greyed out in Android Studio 3.1.2

If you write some kotlin and want to see how it gets compiled into JAVA by using the Decompile Kotlin to Java menu, you need to be viewing the compiled .class file and not the Kotlin source .kt file.

After building the app, try to find the compiled *.kt file in the App/build/tmp/kotlin-classes directory. Here is a simple command line you can run in the root of your project to output the location if your Kotlin file is named Hello.kt:

find  ./ | grep "Hello.class"

Open the .class file in IntelliJ or Android Studio and the menu will be available to see how your Kotlin was converted to JAVA


Another option for viewing Kotlin decompiled code is to open Kotlin bytecode tab and press Decompile there.

Go to Tools -> Kotlin -> Show Kotlin Bytecode press Decompile in the header.

Works for IntelliJ IDEA 2019.3, so I believe it would work in Android Studio as well.


Answer:
              Because, Even after the update of latest Kotlin version ,Sometimes Plugins for Kotlin to Java Decompiler is disabled (OFF).In Order to Enable it, click on Help from the toolbar of Android studio Help

Go to Find Action or Press(Ctrl+Shift+A) Now Click on Actions Tab and search for "Decompile Kotlin to Java" Select the Plugin "Decompile Kotlin to Java" and if it is "OFF" toggle it to "ON" Image of Plugin

Finally, Go to Tools tab >> find Kotlin >> Show Kotlin Bytecode Image for reference

A new tab will open on the left
Image of Decompile


Install the plugin Kotlin to Java decompiler in android studio. Open the kotlin file in the editor Run the action from Code -> Decompile Kotlin to Java