लाइब्रेरी वर्शन
संग्रह की मदद से व्यवस्थित रहें अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Google Play services की लाइब्रेरी को वर्शन 15.0.0 से अलग-अलग मैनेज किया जाता है. इससे हर लाइब्रेरी के लिए डेवलपमेंट टीमें, गड़बड़ियों को ठीक करने और सुविधाओं को बेहतर बनाने के लिए, अलग-अलग और तेज़ी से अपडेट भेज सकती हैं. Google Play services और Firebase के लिए, नई रिलीज़ को ट्रैक किया जा सकता है.
वर्शन का स्ट्रिक्ट मैच
ऐसा हो सकता है कि एक लाइब्रेरी का कोई वर्शन, दूसरी लाइब्रेरी के किसी वर्शन के साथ काम न करे. इस समस्या को हल करने के लिए, कई Gradle प्लगिन, वर्शन के मेल न खाने की समस्या से जुड़ी जानकारी देते हैं. इन प्लगिन में मौजूद लॉजिक, Google Play services और Firebase डिपेंडेंसी से जुड़े ResolutionStrategy
के लिए failOnVersionConflict()
नियम में मौजूद लॉजिक जैसा होता है.
Google की सेवाओं का प्लगिन
Google Services Gradle plugin, Google Play services और Firebase लाइब्रेरी के साथ काम करने वाले वर्शन की जांच करता है.
स्टैंडअलोन वर्शन मैच करने वाला प्लगिन
अगर Google Services प्लगिन का इस्तेमाल नहीं किया जा रहा है, लेकिन आपको अब भी अपनी डिपेंडेंसी के वर्शन की सख्ती से जांच करनी है, तो strict-version-matcher-plugin
लागू करें. GitHub पर इस प्लगिन का कोड देखा जा सकता है.
नीचे दिए गए कोड स्निपेट में, Gradle प्लगिन जोड़ने का तरीका बताया गया है:
Kotlin डीएसएल
build.gradle.kts
plugins { id("com.google.android.gms.strict-version-matcher-plugin") }
ग्रूवी डीएसएल
build.gradle
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
इस प्लगिन का इस्तेमाल करने के लिए, आपको Google की Maven रिपॉज़िटरी से मिला यह कोड भी अपने buildscript classpath में जोड़ना होगा:
Kotlin डीएसएल
build.gradle.kts
classpath("com.google.android.gms:strict-version-matcher-plugin:1.2.4")
ग्रूवी डीएसएल
build.gradle
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-17 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","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-08-17 (UTC) को अपडेट किया गया."],[[["Google Play services libraries are now individually maintained, allowing for faster and more frequent updates to individual components."],["Strict version matching is crucial as library versions might be incompatible, and the Google Services Gradle plugin and the standalone strict-version-matcher-plugin help manage these dependencies."],["The `strict-version-matcher-plugin` offers a way to ensure version compatibility for Google Play services and Firebase dependencies, even without using the Google Services plugin."],["To utilize the standalone plugin, you need to add it to your buildscript classpath and apply it in your Gradle file using the provided code snippets."]]],["Google Play services libraries are individually maintained, enabling faster updates. To manage potential version incompatibilities between libraries, Gradle plugins provide guidance. The Google Services Gradle plugin checks for compatible versions of Google Play services and Firebase libraries. Alternatively, the `strict-version-matcher-plugin` offers dependency version checking without the Google Services plugin. To use it you must add the plugin and the `strict-version-matcher-plugin` classpath to your build script.\n"]]