gpt4 book ai didi

java - 将 Kotlin 转换为 Java

转载 作者:IT老高 更新时间:2023-10-28 13:35:00 25 4
gpt4 key购买 nike

谁能帮我将Android Studio中的Kotlin代码转换成Java

我经历了以下过程:

工具 >> Kotlin>> 将 Kotlin 反编译成 Java

但是“Kotlin to Java”选项被禁用。我该怎么办?

enter image description here

最佳答案

目前 Tools >> Kotlin>> Decompile Kotlin to Java 仅对已编译的 Kotlin 类启用(.class,而不是 .kt 扩展名)位于 app/build/tmp/kotlin-classes/ 成功构建后

@Uriel Frankel 的注释的解决方法:

如果 Tools >> Kotlin >> Show Kotlin Bytecode >> Decompile button 被禁用(或未显示),则应安装 Java Bytecode Decompiler 插件: Preferences >> Plugins >> search forJava Bytecode Decompiler` >> 检查插件并按OK

关于java - 将 Kotlin 转换为 Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50895662/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com