Kotlin 多平台入门
Support for multiplatform programming is one of Kotlin's key benefits. It reduces time spent writing and maintaining the same code for different platforms while retaining the flexibility and benefits of native programming.
Learn more about Kotlin Multiplatform benefits.
Start from scratch
- Get started with Kotlin Multiplatform. Create your first cross-platform application that works on Android and iOS with the help of the Kotlin Multiplatform Mobile plugin for Android Studio. Learn how to create, run, and add dependencies to multiplatform mobile applications.
- Share UIs between iOS and Android. Create a Kotlin Multiplatform application that uses the Compose Multiplatform UI framework for sharing business logic and UIs among the iOS, Android, and desktop platforms.
Dive deep into Kotlin Multiplatform
Once you have gained some experience with Kotlin Multiplatform and want to know how to solve particular cross-platform development tasks:
- Share code on platforms in your Kotlin Multiplatform project.
- Connect to platform-specific APIs when developing multiplatform applications and libraries.
- Set up targets manually for your Kotlin Multiplatform project.
- Add dependencies on the standard, test, or another kotlinx library.
- Configure compilations for production and test purposes in your project.
- Publish a multiplatform library to the Maven repository.
- Build native binaries as executables or shared libraries, like universal frameworks or XCFrameworks.
Get help
- Kotlin Slack: Get an invite and join the #multiplatform channel
- StackOverflow: Subscribe to the "kotlin-multiplatform" tag
- Kotlin issue tracker: Report a new issue