<uses-library>
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ध्यान दें: Google Play, बताए गए <uses-library>
एलिमेंट का इस्तेमाल करता है
को अपने ऐप्लिकेशन मेनिफ़ेस्ट की मदद से, ऐप्लिकेशन को उन डिवाइसों से फ़िल्टर करें जो इसके
लाइब्रेरी की ज़रूरी शर्तें पूरी करनी होंगी. फ़िल्टर करने के बारे में ज़्यादा जानकारी के लिए, देखें
Google Play पर फ़िल्टर.
- सिंटैक्स:
-
<uses-library
android:name="string"
android:required=["true" | "false"] />
- इसमें शामिल है:
-
<application>
- विवरण:
-
इस नीति से, शेयर की गई ऐसी लाइब्रेरी का पता चलता है जिससे ऐप्लिकेशन को लिंक करना ज़रूरी है.
यह एलिमेंट, सिस्टम को क्लास में लाइब्रेरी का कोड शामिल करने के लिए कहता है
लोडर.
सभी android
पैकेज, जैसे कि android.app
,
android.content
, android.view
, और android.widget
,
डिफ़ॉल्ट लाइब्रेरी में है जिससे सभी ऐप्लिकेशन अपने आप लिंक हो जाते हैं
टीम में हुए हैं. हालांकि, maps
जैसे कुछ पैकेज
जो अपने-आप लिंक नहीं होती हैं. सहायता टीम से संपर्क करें
आपके इस्तेमाल किए जा रहे पैकेज के दस्तावेज़. इनसे यह तय किया जा सकता है कि कौनसी लाइब्रेरी
में पैकेज कोड शामिल होता है.
<uses-library>
टैग का क्रम अहम होता है. इससे क्लास के लुकअप पर असर पड़ता है
और ऐप्लिकेशन लोड होने पर उसके समाधान का क्रम तय करते हैं. कुछ लाइब्रेरी में
डुप्लीकेट क्लास का इस्तेमाल किया जा सकता है और इस मामले में पहली लाइब्रेरी को प्राथमिकता दी जाती है.
यह तत्व किसी विशेष डिवाइस पर ऐप्लिकेशन के इंस्टॉलेशन को भी प्रभावित करता है और
Google Play पर ऐप्लिकेशन की उपलब्धता. अगर यह एलिमेंट मौजूद है और
android:required
एट्रिब्यूट को "true"
पर सेट किया गया है,
PackageManager
फ़्रेमवर्क किसी उपयोगकर्ता को तब तक ऐप्लिकेशन इंस्टॉल नहीं करने देगा, जब तक कि
उपयोगकर्ता के डिवाइस पर.
नीचे दिए गए सेक्शन में, android:required
एट्रिब्यूट के बारे में पूरी जानकारी दी गई है.
- विशेषताएं:
-
android:name
- अभी तक किसी भी व्यक्ति ने चेक इन नहीं किया है
लाइब्रेरी का नाम. यह नाम इसके लिए दिया गया है:
का दस्तावेज़ है. इसका एक उदाहरण यह है
"android.test.runner"
एक ऐसा पैकेज जिसमें Android की जांच की जा सकती है
क्लास.
android:required
- अभी तक किसी भी व्यक्ति ने चेक इन नहीं किया है
बूलियन मान बताता है कि ऐप्लिकेशन के लिए
android:name
की ओर से बताई गई लाइब्रेरी.
डिफ़ॉल्ट वैल्यू "true"
है.
एपीआई लेवल 7 में पेश किया गया.
- इसमें पेश किया गया:
- एपीआई लेवल 1
- यह भी देखें:
-
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (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-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# <uses-library\u003e\n\n**Note:** Google Play uses the `\u003cuses-library\u003e` elements declared\nin your app manifest to filter your app from devices that don't meet its\nlibrary requirements. For more information about filtering, see\n[Filters on Google Play](/google/play/filters).\n\nsyntax:\n:\n\n ```xml\n \u003cuses-library\n android:name=\"string\"\n android:required=[\"true\" | \"false\"] /\u003e\n ```\n\ncontained in:\n:\n `\n `[\u003capplication\u003e](/guide/topics/manifest/application-element)`\n `\n\ndescription:\n\n:\n Specifies a shared library that the application must be linked against.\n This element tells the system to include the library's code in the class\n loader for the package.\n\n\n All the `android` packages, such as [android.app](/reference/android/app/package-summary),\n [android.content](/reference/android/content/package-summary), [android.view](/reference/android/view/package-summary), and [android.widget](/reference/android/widget/package-summary),\n are in the default library that all applications are automatically linked\n against. However, some packages, such as `maps`, are\n in separate libraries that aren't automatically linked. Consult the\n documentation for the packages you're using to determine which library\n contains the package code.\n\n\n The order of `\u003cuses-library\u003e` tags is significant. It affects class lookup\n and resolution order when the application loads. Some of the libraries might have\n duplicate classes, and in that case the library that comes first takes priority.\n\n\n This element also affects the installation of the application on a particular device and\n the availability of the application on Google Play. If this element is present and its\n `android:required` attribute is set to `\"true\"`, the\n [PackageManager](/reference/android/content/pm/PackageManager)\n framework won't let a user install the application unless the library is present on the\n user's device.\n\n\n The `android:required` attribute is described in detail in the following section.\n\nattributes:\n:\n\n `android:name`\n :\n The name of the library. The name is provided by the\n documentation for the package you are using. An example of this is\n `\"android.test.runner\"`, a package that contains Android test\n classes.\n\n `android:required`\n :\n Boolean value that indicates whether the application requires the\n library specified by `android:name`.\n\n - `\"true\"`: the application doesn't function without this library. The system doesn't let the application install on a device that doesn't have the library.\n - `\"false\"`: the application uses the library if present, but is designed to function without it if necessary. The system lets the application install, even if the library isn't present. If you use `\"false\"`, you are responsible for checking at runtime that the library is available.\n\n\n To check for a library, you can use reflection to determine\n whether a particular class is available.\n\n\n The default is `\"true\"`.\n\n Introduced in: API level 7.\n\n\nintroduced in:\n: API Level 1\n\nsee also:\n:\n - [PackageManager](/reference/android/content/pm/PackageManager)"]]