<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 테스트 클래스가 포함된 패키지인
"android.test.runner"
를 예로 들 수 있습니다.
android:required
- 애플리케이션에
android:name
에서 지정한 라이브러리가 필요한지 여부를 나타내는 불리언 값입니다.
기본값은 "true"
입니다.
도입 수준: API 수준 7
- 도입 수준:
- API 수준 1
- 참고 항목:
-
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 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)"]]