Nhóm Nền tảng Google Maps thường xuyên cập nhật SDK để bổ sung các tính năng mới, bản sửa lỗi và
hiệu suất. Trang này cung cấp hướng dẫn về cách quản lý các phần phụ thuộc
trên SDK dành cho thiết bị di động.
Cần liên kết với phiên bản nào?
Đối với các ứng dụng thiết yếu, hãy liên kết đến bản phát hành mới nhất của phiên bản lớn
phiên bản mà bạn đang sử dụng (X.*) và nâng cấp hằng năm lên phiên bản lớn mới.
Khi bạn phát hành các phiên bản mới của ứng dụng
suốt cả năm, bạn có thể bắt đầu sử dụng các phiên bản dấu chấm mới hơn của SDK bản đồ dành cho Android. Thao tác này sẽ
không yêu cầu cập nhật trong ứng dụng của bạn vì các phiên bản dấu chấm mới có khả năng tương thích ngược.
Lợi ích:
Nếu bạn phát hiện vấn đề trong SDK bản đồ dành cho Android, các bản sửa lỗi sẽ được cung cấp trong một
tương thích ngược trong vòng 12 tháng kể từ khi phát hành phiên bản lớn đầu tiên, theo mỗi
Hỗ trợ thiết bị di động
. Bạn không cần nâng cấp gấp lên một phiên bản SDK không tương thích
để hưởng lợi từ các bản sửa lỗi.
Bạn có thể dễ dàng áp dụng các tính năng và cải tiến mới nhất khi ứng dụng đã được xây dựng trên đó
phiên bản mới nhất.
Các bản cập nhật gia tăng hằng năm cho phiên bản lớn mới nhất của SDK có thể đòi hỏi ít thao tác hơn
để điều chỉnh, viết lại và kiểm thử ứng dụng thay vì phải xử lý vấn đề không tương thích ngược
các thay đổi được giới thiệu trên nhiều bản phát hành phiên bản chính.
Đối với các ứng dụng không quan trọng, hãy liên kết với một phiên bản đã sửa lỗi bất kỳ. Khi bạn nhận được thông báo về việc ngừng sử dụng
thông báo cho phiên bản đã sửa lỗi đó, bạn sẽ có 12 tháng để cung cấp mã ứng dụng đã cập nhật cho
người dùng của bạn.
Lợi ích:
Giảm tần suất bảo trì.
Các phiên bản mới của ứng dụng tiếp tục hỗ trợ người dùng các thiết bị chạy hệ điều hành thiết bị di động cũ hơn
hệ thống lâu hơn (cho đến khi bạn cần phải nâng cấp lên một phiên bản SDK mới).
Chủ sở hữu dự án có địa chỉ email được giám sát sẽ nhận được thông báo chủ động về những thay đổi
tác động đến từng dự án của họ. Ở lại
thông báo về các bản cập nhật lớn, việc ngừng sử dụng và những thay đổi khác.
Cài đặt
Trong tệp build.gradle.kts hoặc build.gradle ở cấp ứng dụng, hãy luôn chỉ định
một phiên bản thay vì một phạm vi tiền tố (+) hoặc latest vì những giá trị này có thể dẫn đến
cho đến các bản dựng khó đoán và không thể lặp lại. SDK bản đồ dành cho Android tuân thủ
phiên bản ngữ nghĩa và
bản phát hành phiên bản lớn có thể bao gồm cả những thay đổi có thể gây lỗi. Cấp độ API tối thiểu được hỗ trợ là
21.
Chỉ định phần phụ thuộc Maps trong Dịch vụ Google Play bằng cách sử dụng
Cú pháp Gradle.
dependencies{// Maps SDK for Androidimplementation("com.google.android.gms:play-services-maps:19.2.0")}
Android Studio tự động kiểm tra để tìm những phiên bản mới hơn và đưa ra cảnh báo khi một
có phiên bản mới hơn của phần phụ thuộc. Để giảm thiểu nợ kỹ thuật, hãy cập nhật lên phiên bản mới nhất
phiên bản sớm nhất có thể. Nếu bạn đang cập nhật lên một phiên bản lớn mới,
xem ghi chú phát hành
để biết những thay đổi không có khả năng tương thích ngược và cách cập nhật mã.
Ngoài việc thăm dò ý kiến để tìm các phiên bản mới hơn, Google Cloud
dự án
chủ sở hữu nhận được email về các thay đổi không tương thích ngược. Điều này có thể
ảnh hưởng đến dự án của họ. Để nhận thông báo chủ động về khả năng tương thích ngược
thay đổi, chỉ định
vai trò chủ sở hữu bằng một địa chỉ email được giám sát cho mỗi dự án.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eGoogle Maps Platform SDKs are regularly updated with new features, bug fixes, and performance improvements.\u003c/p\u003e\n"],["\u003cp\u003eFor mission-critical apps, link to the latest dot release of the major version and upgrade yearly to ensure you receive timely fixes and benefit from the latest improvements.\u003c/p\u003e\n"],["\u003cp\u003eFor non-critical apps, link to any fixed version and update within 12 months of receiving a deprecation notice, allowing for less frequent maintenance.\u003c/p\u003e\n"],["\u003cp\u003eAlways specify a fixed version number for the Maps SDK dependency in your \u003ccode\u003ebuild.gradle\u003c/code\u003e file to ensure predictable and repeatable builds, and proactively monitor for updates and backwards-incompatible changes to minimize technical debt.\u003c/p\u003e\n"]]],["For mission-critical apps, link to the latest dot release (X.\\*) of your major version and upgrade annually. This ensures backward-compatible fixes and easier adoption of new features. Non-critical apps can use any fixed version, receiving a 12-month deprecation notice for updates. Always specify a fixed version in your `build.gradle` file to avoid unpredictable builds. Maintain updates regularly and check release notes for major version changes. Project owners receive email notifications on backwards incompatible changes.\n"],null,["Select platform: [Android](/maps/documentation/android-sdk/versions \"View this page for the Android platform docs.\") [iOS](/maps/documentation/ios-sdk/versions \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/versions \"View this page for the JavaScript platform docs.\")\n\nThe Google Maps Platform team regularly updates SDKs with new features, bug fixes, and\nperformance improvements. This page provides guidance on how to manage your dependencies\non mobile SDKs.\n\nWhich version to link to?\n\n- **For mission-critical apps**, link to the latest dot release of the major\n version that you are using (X.\\*), and upgrade yearly to the new major version.\n\n As you release new versions of your application\n throughout the year, you may start using newer dot versions of the Maps SDK for Android. This will\n not require updates in your application as new dot versions are backward compatible.\n\n **Benefits:**\n - If you discover issues in the Maps SDK for Android, fixes will be provided in a backward-compatible way for 12 months after the initial release of the major version, per the [Mobile support\n policy](https://developers.google.com/maps/software-support#sdk-support). You will not need to urgently upgrade to an *incompatible* SDK version to benefit from fixes.\n - The latest improvements and features are easy to adopt when your app is already built on the latest version.\n - Annual incremental updates to the newest major version of the SDK may require less work to adapt, rewrite, and test your application, than having to handle backwards-incompatible changes introduced across multiple major version releases.\n\n \u003cbr /\u003e\n\n- **For non-critical apps**, link to any fixed version. When you receive a deprecation\n notice for that fixed version, you will have 12 months to make your updated app code available to\n your users.\n\n **Benefits:**\n - Less frequent maintenance work.\n - New versions of your app keep supporting users' devices running older mobile operating systems for longer (until you need to upgrade to a new SDK version).\n\n \u003cbr /\u003e\n\nProject Owners with monitored email addresses receive proactive notifications about changes that\nimpact each of their projects. [Stay\ninformed](https://developers.google.com/maps/support#staying_informed) about major updates, deprecations, and other changes.\n\nInstallation\n\nIn your app-level `build.gradle.kts` or `build.gradle` file, always specify\na version instead of a prefix range (`+`) or `latest` since these can lead\nto unpredictable and unrepeatable builds. The Maps SDK for Android adheres to\n[semantic versioning](https://semver.org), and new\nmajor version releases may include breaking changes. **The minimum API level supported is\n21**.\n\nSpecifying the Maps dependency within Google Play services using\n[Gradle syntax](https://docs.gradle.org/current/userguide/single_versions.html). \n\n```carbon\ndependencies {\n\n // Maps SDK for Android\n implementation(\"com.google.android.gms:play-services-maps:19.2.0\")\n}\n```\n\nSee additional guidance for\n[managing Google\nPlay services versioning](https://developers.google.com/android/guides/versioning).\n\nMaintenance and upgrade\n\nAndroid Studio automatically checks for newer available versions and provides a warning when a\nnewer version of a dependency is available. To minimize technical debt, update to the newest\navailable version as soon as possible. If you are updating to a new major version,\n[check the release notes](/maps/documentation/android-sdk/releases)\n\nfor backwards-incompatible changes and how to update your code.\n| **Note:**The minimum API level required by Maps SDK for Android version 19.0.x is Android API Level 21 (\"Lollipop\"; Android 5.0) or higher.\n\nIn addition to polling for newer versions, Google Cloud\n[project\nowners](https://cloud.google.com/iam/docs/understanding-roles#basic-definitions) receive emails about backwards incompatible changes that may\naffect their projects. To get proactive notification about backwards incompatible\nchanges, [assign\nthe owner role](https://cloud.google.com/iam/docs/granting-changing-revoking-access) with a monitored email address for each of your projects."]]