Tài liệu tham khảo cho các thư viện này (ví dụ: DataStoreFactory) đánh dấu các API dựa trên khả năng sử dụng được trong các đoạn mã gốc và đoạn mã phổ biến trên Android.
Bạn cũng có thể lọc theo từng loại nền tảng ở đầu mỗi trang. Bảng sau đây cho biết ý nghĩa của từng điểm đánh dấu.
Nền tảng được hỗ trợ
Các bản phát hành thư viện Jetpack cho các nền tảng được hỗ trợ chính thức (Android và iOS) vẫn duy trì các yêu cầu về chất lượng và khả năng tương thích. Tuy nhiên, trong quá trình mở rộng khả năng hỗ trợ Kotlin Multiplatform của Jetpack sang các nền tảng khác, khả năng hỗ trợ về công cụ và cơ sở hạ tầng có thể vẫn đang trong quá trình phát triển.
Bạn có thể tóm tắt cấp độ hỗ trợ hiện tại cho từng nền tảng theo các bậc sau:
Cấp 1:
Được kiểm thử đầy đủ trong CI; bao gồm cả kiểm thử phía máy chủ lưu trữ và kiểm thử trên thiết bị
Đã kiểm thử một phần trên CI; chỉ giới hạn ở các kiểm thử phía máy chủ
Không theo dõi khả năng tương thích nhị phân hoặc nguồn
Cấp 3:
Chưa được kiểm thử trên CI
Không theo dõi khả năng tương thích nhị phân hoặc nguồn
Nền tảng
Mức độ hỗ trợ
Android
Cấp 1
JVM
Cấp 1
iOS
Cấp 1
macOS
Cấp 2
Linux
Cấp 2
watchOS
Cấp 3
tvOS
Cấp 3
Windows
Cấp 3
JavaScript
Cấp 3
WASM
Cấp 3
Hỗ trợ công cụ
Bạn có thể mở, chỉnh sửa và chạy các dự án đa nền tảng trên Android Studio. Tuy nhiên, chưa có một số tính năng IDE cho các dự án này.
Tạo mô-đun KMP mới bằng Android Studio
Bạn có thể bắt đầu di chuyển sang KMP bằng cách tạo một mô-đun dùng chung KMP trong Android Studio. Mô-đun này tự động áp dụng tất cả các trình bổ trợ cần thiết, bao gồm cả trình bổ trợ Android-KMP, để bắt đầu phát triển các ứng dụng Android và iOS.
Trình bổ trợ Kotlin Multiplatform cho Android Studio
Bạn nên cài đặt Trình bổ trợ Kotlin Multiplatform Android Studio do JetBrains phát triển. Trình bổ trợ này cung cấp một số tính năng để đơn giản hoá trải nghiệm phát triển:
Trình hướng dẫn dự án mới: Tạo một dự án đa nền tảng mới trong IDE.
Kiểm tra trước khi triển khai: Quy trình kiểm tra trước khi triển khai giúp bạn định cấu hình môi trường.
Cấu hình chạy: Chạy, gỡ lỗi và kiểm thử các ứng dụng trên cả iOS và Android ngay trong IDE.
Hỗ trợ cơ bản cho Swift trong IDE: Nhận được sự hỗ trợ cơ bản cho Swift trong IDE, bao gồm cả các công cụ gỡ lỗi đa ngôn ngữ, điều hướng và tài liệu nhanh.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-08-13 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-13 UTC."],[],[],null,["# Kotlin Multiplatform Overview\n\n[Kotlin Multiplatform](https://kotlinlang.org/lp/mobile/) (KMP) enables sharing Kotlin code across\ndifferent platforms. Kotlin Multiplatform is developed by JetBrains and is\n[officially supported](https://android-developers.googleblog.com/2024/05/android-support-for-kotlin-multiplatform-to-share-business-logic-across-mobile-web-server-desktop.html) by Google for sharing business logic\nbetween Android and iOS. Using KMP to target mobile platforms is [stable and\nproduction-ready](https://blog.jetbrains.com/kotlin/2023/11/kotlin-multiplatform-stable/).\n\n\u003cbr /\u003e\n\nMultiplatform Jetpack libraries\n-------------------------------\n\nMany of our Jetpack libraries have already been migrated to take advantage of\nKMP. The following Jetpack libraries provide KMP support:\n\n| Maven Group ID | Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release | Documentation |\n|----------------------------------------------------------|-----------------|-----------------------------------------------------------------|------------------------------------------------------------|--------------|-----------------------------------------------------------------------------------|--------------------------------------------------|\n| [annotation (\\*)](/jetpack/androidx/releases/annotation) | July 16, 2025 | [1.9.1](/jetpack/androidx/releases/annotation#annotation-1.9.1) | - | - | - |\n| [collection](/jetpack/androidx/releases/collection) | March 12, 2025 | [1.5.0](/jetpack/androidx/releases/collection#1.5.0) | - | - | - |\n| [datastore](/jetpack/androidx/releases/datastore) | May 20, 2025 | [1.1.7](/jetpack/androidx/releases/datastore#1.1.7) | - | - | [1.2.0-alpha02](/jetpack/androidx/releases/datastore#1.2.0-alpha02) | [Documentation](/kotlin/multiplatform/datastore) |\n| [lifecycle (\\*)](/jetpack/androidx/releases/lifecycle) | August 13, 2025 | [2.9.2](/jetpack/androidx/releases/lifecycle#lifecycle-*-2.9.2) | - | - | [2.10.0-alpha02](/jetpack/androidx/releases/lifecycle#lifecycle-*-2.10.0-alpha02) |\n| [paging (\\*)](/jetpack/androidx/releases/paging) | July 30, 2025 | [3.3.6](/jetpack/androidx/releases/paging#paging-*-3.3.6) | - | - | [3.4.0-alpha02](/jetpack/androidx/releases/paging#paging-*-3.4.0-alpha02) |\n| [room](/jetpack/androidx/releases/room) | August 13, 2025 | [2.7.2](/jetpack/androidx/releases/room#2.7.2) | [2.8.0-rc01](/jetpack/androidx/releases/room#2.8.0-rc01) | - | - | [Documentation](/kotlin/multiplatform/room) |\n| [savedstate](/jetpack/androidx/releases/savedstate) | August 13, 2025 | [1.3.1](/jetpack/androidx/releases/savedstate#1.3.1) | - | - | [1.4.0-alpha02](/jetpack/androidx/releases/savedstate#1.4.0-alpha02) |\n| [sqlite](/jetpack/androidx/releases/sqlite) | August 13, 2025 | [2.5.2](/jetpack/androidx/releases/sqlite#2.5.2) | [2.6.0-rc01](/jetpack/androidx/releases/sqlite#2.6.0-rc01) | - | - | [Documentation](/kotlin/multiplatform/sqlite) |\n\n### Reference documentation\n\nThe reference documentation for these libraries (for example,\n[`DataStoreFactory`](/reference/kotlin/androidx/datastore/core/DataStoreFactory)) marks the APIs based on their availability for common\ncode, Android, and Native.\n\nYou can also filter for declarations by platform at the top of each page. The\nfollowing table shows the meaning of each marker.\n\n\u003cbr /\u003e\n\nSupported platforms\n-------------------\n\nJetpack library releases for officially supported platforms, Android and iOS,\nmaintain the same quality and compatibility requirements. However, as we work to\nexpand Jetpack's Kotlin Multiplatform support to other platforms, the tooling\nand infrastructure support may be a work in progress.\n\nThe current level of support for each platform can be summarized in tiers:\n\n**Tier 1**:\n\n- Fully tested in CI; including both host-side and on-device tests\n- Source and binary compatibility tracking in accordance with our [semantic\n versioning policies](/jetpack/androidx/versions)\n\n**Tier 2**:\n\n- Partially tested on CI; limited to host-side tests\n- No source or binary compatibility tracking\n\n**Tier 3**:\n\n- Untested on CI\n- No source or binary compatibility tracking\n\n| Platform | Level of support |\n|------------|------------------|\n| Android | Tier 1 |\n| JVM | Tier 1 |\n| iOS | Tier 1 |\n| macOS | Tier 2 |\n| Linux | Tier 2 |\n| watchOS | Tier 3 |\n| tvOS | Tier 3 |\n| Windows | Tier 3 |\n| JavaScript | Tier 3 |\n| WASM | Tier 3 |\n\n| **Note:** The support level per-platform listed here is for Jetpack **library** releases. Tooling and IDE support in Android Studio is still a work in progress, and not all features may work for KMP projects.\n\nTooling support\n---------------\n\nYou can open, edit, and run multiplatform projects in Android Studio. However,\nsome IDE features aren't yet available for these projects.\n\n### Create a new KMP module with Android Studio\n\nYou can start migrating to KMP by [creating a KMP shared module](/kotlin/multiplatform/migrate)\nwithin Android Studio. This module automatically applies all the necessary\nplugins, including the [Android-KMP plugin](/kotlin/multiplatform/plugin), to start developing\nAndroid and iOS apps.\n\n### Kotlin Multiplatform Android Studio Plugin\n\nWe recommend installing the [Kotlin Multiplatform](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform) Android\nStudio Plugin developed by JetBrains. This plugin offers several features to\nease the development experience:\n\n- **New project wizard**: Create a new multiplatform project within the IDE.\n- **Preflight checks**: Preflight checks help you configure your environment.\n- **Run configurations**: Run, debug, and test applications on both iOS and Android directly from the IDE.\n- **Basic Swift support in the IDE**: Get basic Swift support in the IDE, including cross-language debugging tools, navigation, and quick documentation.\n\nAdditional Resources\n--------------------\n\nFor further information about the overall multiplatform ecosystem and more\nadvanced configurations, see the official\n[Kotlin Multiplatform documentation](https://kotlinlang.org/docs/multiplatform-intro.html).\n\n- The [kotlin-multiplatform-samples](https://github.com/android/kotlin-multiplatform-samples) - showcases some of the\n functionality of Jetpack libraries in a KMP project.\n\n- [Get Started with KMP Codelab](/codelabs/kmp-get-started) - guided onboarding how to add KMP to your\n project.\n\n- [Migrate Room to Room KMP Codelab](/codelabs/kmp-migrate-room) - guided migration of Android-only\n Room to KMP.\n\nFeedback\n--------\n\nIf you have feedback on these libraries, share it through the [issue\ntracker](https://issuetracker.google.com/issues/new?component=1337890&template=1803002).\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Migrate existing apps to Room KMP Codelab](/codelabs/kmp-migrate-room)\n- [Get Started with KMP Codelab](/codelabs/kmp-get-started)\n- [Use the Android-KMP Gradle plugin](/kotlin/multiplatform/plugin)"]]