Kotlin 可完全与 Java 互操作,因此您可以根据需要在应用中添加任意数量的 Kotlin 代码。通过从 Java 到 Kotlin 的学习衔接课程中的文章和 Codelab,您可以学习如何编写惯用的 Kotlin 代码、如何将 Kotlin 代码添加到现有应用,以及如何顺畅地在 Java 代码中调用 Kotlin 代码。此外,还将了解到 Android Studio 可如何帮助您将 Java 代码转换为 Kotlin 代码。
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2020-11-13 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]