Kotlin 指南更新日志
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
2024 年 7 月 29 日
互操作
2023 年 9 月 6 日
- 新功能:允许
camelCase
使用包含多个名称的复数文件名
声明。
2021 年 12 月 9 日
- 修复:阐明了单行 if/else 语句不需要大括号的规则。
2021 年 5 月 19 日
- 修复:移除了有关何时使用表达式函数的规则。
- 新增:新增了禁止使用包含空格的函数名称的规则。
2020 年 6 月 10 日
2018 年 5 月 18 日
样式
- 修复:函数参数换行缩进已更改为单缩进以匹配
JetBrains 样式指南。
- 修复:添加了范围运算符作为二元运算符空白的例外情况。
互操作
- 新增:添加了一个关于 Kotlin 和 Java 互操作性的 Lint 检查的部分。
2017 年 11 月 14 日
互操作
修复:更正了“Lambda 参数”的内容部分
反映了 lambda 类型和接口 SAM 转换的当前状态。
2017 年 11 月 2 日
初始版本。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Kotlin guide change log\n\n29 July 2024\n------------\n\n### Interop\n\n- Fix: Corrected source syntax issues in the [\"Lambda parameters last\"](/kotlin/interop#lambda-parameters) and [\"Idiomatic naming\"](/kotlin/interop#idiomatic-naming) sections that prevented some code snippets from fully rendering.\n\n06 September 2023\n-----------------\n\n- New: Allow `camelCase` for plural filenames containing multiple declarations.\n\n9 December 2021\n---------------\n\n- Fix: Clarify rule on braces not being required for single-line if/else.\n\n19 May 2021\n-----------\n\n- Fix: Remove rule on when to use expression functions.\n- New: Added rule prohibiting function names with spaces.\n\n10 June 2020\n------------\n\n- Fix: Must wrap after operators in the general case (\u003chttps://github.com/android/kotlin-guides/issues/62\u003e).\n- New: Added rule for `@[...]` annotation syntax.\n\n18 May 2018\n-----------\n\n### Style\n\n- Fix: Function parameter wrap indent has changed to single indent to match the JetBrains style guide.\n- Fix: Add the range operator as an exception to binary operator whitespace.\n\n### Interop\n\n- New: Added a section about Lint Checks for Kotlin and Java Interoperability.\n\n14 November 2017\n----------------\n\n### Interop\n\nFix: Corrected the content of the \"Lambda arguments\" section to accurately\nreflect the current state of lambda types and interface SAM conversion.\n\n2 November 2017\n---------------\n\nInitial release."]]