However, if I manually do “Show Kotlin Bytecode” and click on “Decompile” it will show the correct java code.
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
Answered By – bsautner