Kotlin 文档

最新稳定版:1.6.10

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

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

第一步

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

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

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

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

精选主题

标准库 API 参考
Living essentials for everyday work with Kotlin: IO, files, threading, collections, and much more

编码规范
Recommendations on the code organization, formatting, and naming

基本类型
Kotlin type system: numbers, strings, arrays, and other built-in types

控制流程
Conditions and loops: if, when, for, while

空安全
Nullable and non-null types, elvis operator, safe calls and casts

协程
Concurrency: coroutines, flows, channels

新特性

Kotlin 1.6.0 的新特性
Latest features: sealed whens, suspend functions as supertypes, and more

Kotlin 公共路线图
Future plans on Kotlin development

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 中的 EduTools
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