如何更改我的编译器的ABI版本?



我即将使用外部库,但它们不工作,当我看着它们时,我发现了这个

// This class file was compiled with different version of Kotlin compiler and can't be decompiled.
//
// Current compiler ABI version is 1.1.16
// File ABI version is 1.5.1

所以我想知道如何更新我的编译器Abi版本而且,我是否应该担心,其他一些外部库可能与此冲突?是否可以管理不同的编译器ABI版本?

Kotlin编译器应该提供指定源和目标版本兼容性的功能。

  • version表示支持Kotlin语言的哪些特性。应该是https://kotlinlang.org/docs/compiler-reference.html#language-version-version
  • version定义了结果JVM字节码的版本。我认为这是正确的开关:https://kotlinlang.org/docs/compiler-reference.html#jvm-target-version。在谈论ABI版本时,这才是最重要的。请注意,如果旧的目标版本不支持新的语言特性,您可能仍然需要更改源版本。

最新更新