Kotlin 文档

最新稳定版:1.8.10

Kotlin 入门
在 IDE 中(IntelliJ IDEA 或 Android Studio)为所选平台创建第一个 Kotlin 项目

在线试用 Kotlin
直接在浏览器中编写、编辑、运行与共享 Kotlin 代码

第一步

基础语法
快速了解 Kotlin 语法:关键字、操作符、程序结构

例学 Kotlin
Kotlin 语法简单评注版示例

心印
让你熟悉 Kotlin 的编程练习

命令行编译器
下载并安装 Kotlin 编译器

精选主题

标准库 API 参考
Kotlin 日常工作必备:IO、 文件、 线程、 集合等等

编码规范
关于代码组织、格式与命名的建议

基本类型
Kotlin 类型系统:数字、字符串、数组与其他内置类型

控制流程
条件与循环:if、 when、 for、 while

空安全
可空与非空类型、 elvis 运算符、安全调用与类型转换

协程
并发:协程、流、通道

新特性

Kotlin 1.8.0 的新特性
最新特性:改进了 kotlin-reflect 性能,JVM 平台新版递归复制或删除目录内容的实验性函数,kotlin-stdlib-jdk7kotlin-stdlib-jdk8 合并到 kotlin-stdlib,改进了 Objective-C/Swift 互操作性等等

Kotlin 公开路线图
Kotlin 开发的未来计划

Kotlin 多平台移动端

Android Studio 中 KMM 入门
Useful links to help you start using the SDK

用于 Android Studio 的插件版本发布
Features of the Kotlin Multiplatform Mobile plugin

Kotlin 多平台 Multiverse
Videos about Kotlin Multiplatform Mobile on our YouTube channel


学习 Kotlin

例学 Kotlin
Simple annotated examples for the Kotlin syntax

心印
Programming exercises to get you familiar with Kotlin

JetBrains 学院
Kotlin Basics track on JetBrains Academy

Advent of Code
Code puzzles in idiomatic Kotlin

动手实践教程
Complete long-form tutorials to fully grasp a technology

IntelliJ IDEA 中的 JetBrains 学院
An IDE plugin for learning and teaching programming languages

图书
The books that we've reviewed and recommend for learning Kotlin

在 YouTube 上观看 Kotlin 视频

Kotlin YouTube channel
Official Kotlin YouTube channel

Kotlin in Spring Framework
Tutorials on using Kotlin with Spring

Webinars with experts
Webinars on using Kotlin for server-side development

Kotlin Multiplatform Multiverse
Tutorials on using Kotlin Multiplatform Mobile

Competitive programming
Kotlin for competitive programming

Kotlin standard library
Tutorials on using the standard library

Talking Kotlin podcast
Talking Kotlin podcast

Kotlin for educators
Stories about teaching Kotlin

Kotlin Online Event 2021
Talks from the Kotlin Online Event 2021

保持联系并贡献力量

为 Kotlin 贡献力量
The ways in which you can help the development of Kotlin

参与抢先体验计划(EAP)
Preview versions for trying out features before their official releases

加入 Kotlin Slack
Official public Kotlin Slack

在 Twitter 上关注 Kotlin
Official Kotlin Twitter

在 Reddit 上探讨
Kotlin on Reddit

参与 Stack Overflow 的讨论
Kotlin on Stack Overflow