javakotlin
Shift + Alt + Cmd + k Mac
Shift + Alt + Ctrl + k Windows

如下图所示:
AndroidStudio java和kotlin相互转化
这里记录下java一键转kotlin遇到的几个错误:
1.Overload resolution ambiguity. All these functions match
原因:名字冲突。编译器不知道引用哪一个
参考链接1
2.Smart cast to 'Type' is impossible, because 'variable' is a mutable property that could have been changed by this time
参考链接2

Kotlinjava

Tools>Kotlin>Show Kotlin Bytecode
Decompile
AndroidStudio java和kotlin相互转化

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2021-10-26
  • 2022-12-23
  • 2021-08-25
  • 2021-05-27
猜你喜欢
  • 2021-05-02
  • 2021-06-29
  • 2021-08-03
  • 2021-08-31
  • 2021-12-24
相关资源
相似解决方案