與其他 Google Play 服務不同,Google Play 服務 APK 中的標準 Google Mobile Ads SDK 實作項目也包含在 Google Play 服務用戶端程式庫中。這項變更可讓裝置支援 Google Play 服務 APK。在執行階段,SDK 會比較用戶端程式庫和 Google Play 服務 APK 的版本,並使用較新版本。
Lite SDK 會從用戶端程式庫中移除 Google Mobile Ads SDK 實作項目,只留下 Google Play 服務 APK 的介面。Lite SDK 依賴 APK 的實作項目。如果您在 Google Play 商店以外的平台部署應用程式,無法保證使用者裝置會安裝 Google Play 服務 APK。
在搭載最新版 Google Play 服務的裝置上,Lite SDK 的行為與標準 SDK 相同。不過,如果裝置上的 Google Play 服務過舊或不存在,Lite SDK 可能會參照無法使用或已變更的 API (與 Google Play 服務 APK 中的 API 不同)。這會導致無作業,並記錄錯誤,可能導致廣告無法放送至這些裝置。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[[["\u003cp\u003eThe Google Mobile Ads Lite SDK is a smaller version of the Google Mobile Ads SDK, designed to reduce app size and method references.\u003c/p\u003e\n"],["\u003cp\u003eUsing the Lite SDK helps avoid the 64K reference limit, especially beneficial when targeting older Android versions.\u003c/p\u003e\n"],["\u003cp\u003eThe Lite SDK is exclusively for apps distributed via the Google Play Store and relies on the Google Play services APK for its implementation.\u003c/p\u003e\n"],["\u003cp\u003eOn devices lacking or with outdated Google Play services, the Lite SDK may encounter API discrepancies, leading to ad serving issues.\u003c/p\u003e\n"],["\u003cp\u003eWhile functionally similar to the standard SDK on updated devices, the Lite SDK depends on the Google Play services APK, making it unsuitable for deployments outside the Play Store.\u003c/p\u003e\n"]]],[],null,["Like any Android library, the Google Play services SDK increases the size of\napps that include it. The Google Mobile Ads Lite SDK is a lightweight version\nof Google Mobile Ads SDK built to reduce that impact. It is a fraction of\nthe size of the regular SDK.\n\nAlongside reduced size, using the Lite SDK decreases the total number of\nmethods referenced in an app. This is especially useful when deploying to older\nversions of Android, where developers can run into the [64K reference\nlimit](//developer.android.com/studio/build/multidex).\n\nHere's how to configure gradle to incorporate the Lite SDK into your app: \n\n dependencies {\n implementation 'com.google.android.gms:play-services-ads-lite:24.3.0'\n }\n\nLimitations of the Lite SDK\n\nThe Lite SDK should only be used in apps distributed through the\nGoogle Play store.\n\nUnlike other [Google Play services](/android/guides/overview), the standard\nGoogle Mobile Ads SDK implementation in the Google Play services APK is also\nincluded in the Google Play services client library. This allows for support on\ndevices without the Google Play services APK. At runtime, the SDK will compare\nthe versions of the client library and the Google Play services APK and use the\nnewer version.\n\nThe Lite SDK strips Google Mobile Ads SDK implementation from the client\nlibrary, leaving only an interface to the Google Play services APK. The Lite\nSDK relies on the implementation of the APK. If you deploy your app outside of\nthe Google Play store, it is not guaranteed that your user's devices will have\nthe Google Play services APK installed.\n\nOn devices with an up-to-date version of Google Play services, the Lite SDK's\nbehavior is identical to that of the standard SDK. However, on devices where\nGoogle Play services is outdated or not present, the Lite SDK may reference\nAPIs that are unavailable or have been changed from those in the Google Play\nservices APK. This will result in a no-op and an error being logged, which may\ncause ads not to serve to those devices.\n\nLite SDK release cadence\n\nStarting with version 24.1.0, the `play-services-ads-lite`\nartifact stops releasing at the same cadence as `play-services-ads`. This\nchange allows for a more gradual and stable rollout of the SDK implementation.\nThe Lite SDK releases approximately every third SDK release.\n\nProjects that depend on both `play-services-ads-lite` version 24.0.0 or lower\nand `play-services-ads` version 24.1.0 or higher encounter a `Duplicate class`\nerror during app compilation. Resolve this error by using only one of the\n`play-services-ads` or `play-services-ads-lite` artifacts."]]