حزمة تطوير البرامج (SDK) لإصدار "Lite" من "إعلانات Google على الأجهزة الجوّالة"
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
وكما هو الحال مع أي مكتبة Android، تزيد حزمة تطوير البرامج (SDK) الخاصة بخدمات Google Play من حجم التطبيقات التي تتضمّنها. حزمة تطوير البرامج (SDK) الخفيفة من "إعلانات Google على الأجهزة الجوّالة" هي إصدار خفيف الوزن من حزمة تطوير البرامج (SDK) من "إعلانات Google على الأجهزة الجوّالة"، وقد تم تصميمها للحدّ من هذا التأثير. وهي تشكّل جزءًا من حجم حزمة SDK العادية.
بالإضافة إلى تقليل الحجم، يؤدي استخدام حزمة Lite SDK إلى تقليل العدد الإجمالي للطُرق المشار إليها في التطبيق، وهو أمر مفيد بشكل خاص عند النشر على إصدارات Android القديمة، حيث يمكن أن يواجه المطوّرون الحد الأقصى المسموح به وهو 64 ألف مرجع.
في ما يلي كيفية ضبط Gradle لدمج حزمة تطوير البرامج (SDK) Lite في تطبيقك:
يجب استخدام حزمة Lite SDK في التطبيقات الموزَّعة من خلال
متجر Google Play فقط.
على عكس خدمات Google Play الأخرى، يتم أيضًا تضمين عملية التنفيذ العادية لحزمة "SDK لإعلانات Google على الأجهزة الجوّالة" في حزمة APK الخاصة بخدمات Google Play في مكتبة برامج العميل الخاصة بخدمات Google Play. يتيح ذلك توفير الدعم على الأجهزة التي لا يتوفّر عليها حزمة APK لخدمات Google Play. أثناء وقت التشغيل، ستقارن حزمة SDK بين إصدارَي مكتبة العميل وحزمة APK الخاصة بـ "خدمات Google Play"، وستستخدم الإصدار الأحدث.
تزيل حزمة Lite SDK عملية تنفيذ "حزمة تطوير البرامج (SDK) لإعلانات Google على الأجهزة الجوّالة" من مكتبة العميل، ولا تترك سوى واجهة لحزمة APK الخاصة بخدمات Google Play. تعتمد حزمة تطوير البرامج (SDK) Lite
على تنفيذ حزمة APK. إذا نشرت تطبيقك خارج متجر Google Play، لا نضمن توفّر حزمة APK لخدمات Google Play على أجهزة المستخدمين.
على الأجهزة التي يتوفّر عليها إصدار حديث من "خدمات Google Play"، يكون سلوك حزمة Lite SDK مماثلاً لسلوك حزمة SDK العادية. ومع ذلك، على الأجهزة التي تكون فيها "خدمات Google Play" قديمة أو غير متوفّرة، قد تشير حزمة تطوير البرامج (SDK) الخفيفة إلى واجهات برمجة تطبيقات غير متاحة أو تم تغييرها عن تلك الموجودة في حزمة APK الخاصة بـ "خدمات Google Play". سيؤدي ذلك إلى عدم تنفيذ أي عملية وتسجيل خطأ، ما قد يؤدي إلى عدم عرض الإعلانات على هذه الأجهزة.
وتيرة إصدار حزمة تطوير البرامج (SDK) البسيطة
بدءًا من الإصدار 24.1.0، سيتوقف إصدار play-services-ads-lite
الأداة بالوتيرة نفسها التي يتم بها إصدار play-services-ads. يتيح هذا التغيير طرح عملية تنفيذ حزمة SDK بشكل تدريجي وثابت أكثر.
يتم طرح إصدارات Lite من حزمة تطوير البرامج (SDK) كل ثلاثة إصدارات تقريبًا من حزمة تطوير البرامج (SDK).
تحدث مشكلة Duplicate class أثناء تجميع التطبيق في المشاريع التي تعتمد على الإصدار 24.0.0 أو إصدار أقدم من play-services-ads-lite والإصدار 24.1.0 أو إصدار أحدث من play-services-ads. يمكنك حلّ هذا الخطأ باستخدام أحد العنصرين play-services-ads أو play-services-ads-lite فقط.
تاريخ التعديل الأخير: 2025-09-05 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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."]]