Google Play 服务概览
bookmark_border
bookmark
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Google Play 服务在 Android 平台上提供一系列丰富多样的 SDK,可助力您打造应用、加强隐私保护、提升安全性、吸引用户以及拓展业务。如图 1 所示,这些 SDK 只需要在应用中添加一个轻量级客户端库。在运行时,客户端库会与在主 Google Play 服务应用中运行的完整实现进行通信。
通过提供共享的客户端实现,Google Play 服务:
- 有助于优化设备端资源(例如存储空间和内存),从而提升应用质量和用户的整体体验。
- 独立于操作系统、OEM 或应用更新接收自动更新,因此您的用户可以更快地获得改进和 bug 修复。
- 可向后兼容至 Android 6.0(API 级别 23),并适用于各种设备规格,让您能够以更少的精力触达更多用户。
图 1. Google Play 服务会定期接收包含改进和 bug 修复的更新。
Google Play 服务的运作方式
SDK
每个 Google Play 服务 SDK 都包含一个轻量级客户端库,其中包含与 Google Play 服务应用中运行的服务进行交互的 API。这些库还提供了一些帮助程序,用于妥善处理运行时问题,例如服务缺失、已停用或过时。启用代码压缩后,R8 优化器会通过移除未使用的代码来进一步减少 SDK 对软件包大小的影响。
如需访问新的 Google Play 服务功能或产品,请在 Google Maven 制品库中发布新版本时升级 SDK。
服务
Google Play 服务包含一组核心的设备端后台服务,可在所有经过 Google 认证的 Android 设备上运行。
Google Play 服务的自动更新独立于运营商、操作系统或 OEM 系统映像更新进行。一般来说,只要设备搭载 Android 6.0 或更高版本、安装了 Google Play 服务且有足够的可用存储空间,就会自动接收更新。这意味着用户可以更快地获得改进和 bug 修复,并且您可以在覆盖 Android 生态系统中的大多数设备的同时,利用最新的 API。不支持搭载低于 Android 6.0 的设备或未安装 Google Play 服务的设备。
后续步骤:设置应用
如需开始在应用中使用 Google Play 服务 API,请参阅此设置指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-17。
[null,null,["最后更新时间 (UTC):2025-08-17。"],[[["\u003cp\u003eGoogle Play services optimizes app performance and user experience by providing shared, client-side implementations of SDKs, minimizing resource usage.\u003c/p\u003e\n"],["\u003cp\u003eAutomatic updates to Google Play services ensure users receive the latest improvements and bug fixes quickly, independent of OS or device updates.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Play services offers broad compatibility, supporting Android 6.0 (API level 23) and above, various form factors, enabling wider user reach with less development effort.\u003c/p\u003e\n"],["\u003cp\u003eSDKs powered by Google Play services utilize lightweight client libraries, reducing app size and ensuring efficient interactions with Google services.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Play services runs essential Google services in the background on certified Android devices, delivering automatic updates for enhanced functionality and security.\u003c/p\u003e\n"]]],["Google Play services provides lightweight SDK client libraries for Android apps, which interact with shared services on the device. These services optimize device resources, receive automatic updates independent of OS or app updates, and offer backward compatibility to Android 6.0. Developers can update SDKs to access new features through the Google Maven repository. Automatic updates are delivered to devices with Google Play services installed and running Android 6.0 or later. R8 optimizer can reduce the footprint of each SDK.\n"],null,["# Overview of Google Play services\n\n\u003cbr /\u003e\n\nGoogle Play services powers a broad set of SDKs on Android for building\nyour app, enhancing privacy and security, engaging users, and growing your\nbusiness. These SDKs only require a lightweight client library to be\nincluded in your app, as shown in figure 1. At runtime, the client library\ncommunicates with a full implementation running in the main Google\nPlay services application.\n\nBy providing shared, client-side implementations, Google Play services:\n\n- Helps to optimize on-device resources, such as storage and memory, to improve [app quality](https://developer.android.com/quality) and your users' overall experience.\n- Receives automatic updates---independent of OS, OEM, or app updates---so your users receive improvements and bug fixes more quickly.\n- Provides backward compatibility to Android 6.0 (API level 23) and works across various form factors, enabling you to reach more users with less effort.\n\n**Figure 1.** Google Play services receives regular updates that contain\nimprovements and bug fixes.\n\nHow Google Play services works\n------------------------------\n\n### SDKs\n\nEach Google Play services SDK includes a lightweight client library with APIs\nthat interact with a service that runs in the Google Play services application.\nThese libraries also provide helpers to gracefully handle runtime issues, such\nas when a service is missing, disabled, or out-of-date. When you\nenable code shrinking, the\n[R8 optimizer](https://developer.android.com/studio/build/shrink-code)\nfurther reduces the SDK's impact on your package size by removing unused code.\n\nTo access new Google Play services features or products, upgrade the SDK when a\nnew version is [released](/android/guides/releases) to the [Google Maven\nrepository](https://maven.google.com/web/index.html#com.google.android.gms).\n\n### Services\n\nGoogle Play services contains a core set of on-device background services that\nrun on all Google-certified Android devices.\n\nAutomatic updates to Google Play services are delivered independent of carrier,\nOS, or OEM system image updates. In general, devices running Android 6.0 or\nhigher receive updates automatically, provided that these devices have Google\nPlay services installed and sufficient storage available. This means that users\nreceive improvements and bug fixes more quickly, and you can take advantage of\nthe latest APIs while reaching most devices in the Android ecosystem. Devices\nolder than Android 6.0, or devices without Google Play services installed,\naren't supported.\n\nNext steps: set up your app\n---------------------------\n\nTo begin using Google Play services APIs in your app, read this [setup\nguide](/android/guides/setup)."]]