简体   繁体   中英

I was accidentally convert Java file to Kotlin file in Android Studio. How to convert back?

I was accidentally convert Java file to Kotlin file in Android Studio.

I'm try to Tools >> Kotlin >> Show Kotlin Bytecode >> Decompile , but I can't click on the button, see below

图片

There is no way to convert Kotlin to Java. When you accidentally converted it you have to press Ctrl + Z. ;)

Now if you have git to roll your changes back.

As i see the kotlin file is not destroyed, but the "Decompile Java file" is added on the right side of tabs. So the is no problem in loosing your code data. Hope i understand your problem right.

My view of "destroid" file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM