예를 들어 다음 명령어를 사용하여 현재 사용하는 채널과 관계없이 지정된 NDK 버전을 설치합니다.
sdkmanager --install "ndk;21.3.6528147" --channel=3 // Install the NDK from the canary channel (or below)
sdkmanager --install "cmake;10.24988404" // Install a specific version of CMake
설치된 모든 패키지 업데이트
설치된 모든 패키지를 업데이트하려면 다음 문법을 사용합니다.
sdkmanager --update [options]
라이선스 수락
설치한 각 패키지에 필요한 라이선스를 수락해야 합니다. 이 단계는 Android 스튜디오 내에서 패키지를 설치할 때 설치 흐름 중에 발생합니다.
Android 스튜디오가 설치되어 있지 않은 경우나 CI 서버용이거나 GUI가 설치되지 않은 다른 헤드리스 Linux 기기용이면 명령줄에서 다음을 실행하세요.
sdkmanager --licenses
그러면 아직 수락하지 않은 라이선스를 수락하라는 메시지가 표시됩니다.
옵션
다음 표에는 이전 섹션에 나열된 명령어에 사용할 수 있는 옵션이 나와 있습니다.
옵션
설명
--sdk_root=path
이 도구를 포함하는 SDK 대신 지정된 SDK 경로를 사용합니다.
--channel=channel_id
channel_id 이하 채널의 패키지를 포함합니다. 사용 가능한 채널은 다음과 같습니다.
0(안정적), 1(베타), 2(개발) 및 3(Canary).
--include_obsolete
사용되지 않는 패키지를 패키지 목록 또는 패키지 업데이트에 포함합니다.
--list 및 --update에서만 사용합니다.
--no_https
모든 연결이 HTTPS가 아닌 HTTP를 사용하도록 강제합니다.
--newer
--list를 사용하여 새 패키지 또는 업데이트 가능한 패키지만 표시합니다.
--verbose
상세 출력 모드. 오류, 경고 및 정보 메시지가 출력됩니다.
--proxy={http | socks}
지정된 유형의 프록시를 통해 연결합니다. HTTP 또는 FTP와 같은 높은 레벨의 프로토콜에는 http를 사용하고, SOCKS(V4 또는 V5) 프록시에는 socks를 사용합니다.
--proxy_host={IP_address | DNS_address}
사용할 프록시의 IP 또는 DNS 주소입니다.
--proxy_port=port_number
연결할 프록시 포트 번호입니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-21(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-21(UTC)"],[],[],null,["# sdkmanager\n\nThe `sdkmanager` is a command-line tool that lets you view, install,\nupdate, and uninstall packages for the Android SDK. If you're using Android\nStudio, then you don't need to use this tool, and you can instead [manage your\nSDK packages from the IDE](/studio/intro/update#sdk-manager).\n\nThe `sdkmanager` tool is provided in the\n[Android SDK Command-Line Tools](/studio/command-line#tools-sdk) package.\nTo use the SDK Manager to install a version of the command-line tools,\nfollow these steps:\n\n1. Download the latest [command line tools package](/studio#command-line-tools-only) from the [Android Studio](/studio) page and extract the package.\n2. Move the unzipped `cmdline-tools` directory into a new directory of your choice, such as \u003cvar translate=\"no\"\u003eandroid_sdk\u003c/var\u003e. This new directory is your Android SDK directory.\n3. In the unzipped `cmdline-tools` directory, create a sub-directory called `latest`.\n4. Move the original `cmdline-tools` directory contents, including the `lib` directory, `bin` directory, `NOTICE.txt` file, and `source.properties` file, into the newly created `latest` directory. You can now use the command-line tools from this location.\n5. (Optional) To install a previous version of the command-line tools, run\n the following command:\n\n ```\n android_sdk/cmdline-tools/latest/bin/sdkmanager --install \"cmdline-tools;version\"\n ```\n Substitute \u003cvar translate=\"no\"\u003eversion\u003c/var\u003e with the version you want to install, for example `5.0`. **Note:** For local usage, you can use the `latest` packages. For scripts, choose a specific version instead to ensure stability.\n\nUsage\n-----\n\nYou can use the `sdkmanager` to list installed and available packages, install\npackages, and update packages. For more details, see the following sections.\n\n### List installed and available packages\n\nTo list installed and available packages, use the following syntax: \n\n```\nsdkmanager --list [options] \\\n [--channel=channel_id] // Channels: 0 (stable), 1 (beta), 2 (dev), or 3 (canary)\n```\n\nUse the `channel` option to include a package from a channel up to and\nincluding `channel_id`. For example, specify the canary channel to list\npackages from all channels.\n| **Note:** To list only stable packages, use `--channel=0` or remove the `--channel` option entirely.\n\n### Install packages\n\nTo install packages, use the following syntax: \n\n```\nsdkmanager packages [options]\n```\n\nThe \u003cvar translate=\"no\"\u003epackages\u003c/var\u003e argument is an SDK-style path, as shown with\nthe `--list` command, wrapped in quotes. For example,\n`\"build-tools;35.0.0\"` or\n`\"platforms;android-33\"`.\n\nYou can pass multiple package\npaths, separated with a space, but they must each be wrapped in their own set of\nquotes. For example, here's how to install the latest platform tools and\nthe SDK tools for API level 33: \n\n sdkmanager \"platform-tools\" \"platforms;android-33\"\n\nAlternatively, you can pass a text file that specifies all packages: \n\n```\nsdkmanager --package_file=package_file [options]\n```\n\nThe \u003cvar translate=\"no\"\u003epackage_file\u003c/var\u003e argument is the location of a text file in which\neach line is an SDK-style path of a package to install (without quotes).\n\nTo uninstall, add the `--uninstall` flag: \n\n```\nsdkmanager --uninstall packages [options]\nsdkmanager --uninstall --package_file=package_file [options]\n```\n\nTo install CMake or the NDK, use the following syntax: \n\n```transact-sql\nsdkmanager --install\n [\"ndk;\u003cvar translate=\"no\"\u003emajor\u003c/var\u003e.\u003cvar translate=\"no\"\u003eminor\u003c/var\u003e.\u003cvar translate=\"no\"\u003ebuild\u003c/var\u003e[\u003cvar translate=\"no\"\u003esuffix\u003c/var\u003e]\" | \"cmake;major.minor.micro.build\"]\n [--channel=\u003cvar translate=\"no\"\u003echannel_id\u003c/var\u003e] // NDK channels: 0 (stable), 1 (beta), or 3 (canary)\n```\n\nFor example, use the following command to install the specified NDK version\nregardless of which channel it is currently on: \n\n```text\nsdkmanager --install \"ndk;21.3.6528147\" --channel=3 // Install the NDK from the canary channel (or below)\nsdkmanager --install \"cmake;10.24988404\" // Install a specific version of CMake\n```\n\n### Update all installed packages\n\nTo update all installed packages, use the following syntax: \n\n```\nsdkmanager --update [options]\n```\n\n### Accept licenses\n\nYou are required to accept the necessary license for each package you have\ninstalled. This step occurs during the installation flow when you install\npackages from within Android Studio.\n\nIf you don't have Android Studio installed, or it is for a CI server\nor other headless Linux device without a GUI installed, do the\nfollowing from the command-line: \n\n```text\nsdkmanager --licenses\n```\n\nThis prompts you to accept any licenses that haven't already been accepted.\n\nOptions\n-------\n\nThe following table lists the available options for the commands listed in the preceding section:\n\n| Option | Description |\n|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `--sdk_root=`**\u003cvar translate=\"no\"\u003epath\u003c/var\u003e** | Use the specified SDK path instead of the SDK containing this tool. |\n| `--channel=`**\u003cvar translate=\"no\"\u003echannel_id\u003c/var\u003e** | Include packages in channels up to and including channel_id. Available channels are: `0` (Stable), `1` (Beta), `2` (Dev), and `3` (Canary). |\n| `--include_obsolete` | Include obsolete packages in the package listing or package updates. For use with `--list` and `--update` only. |\n| `--no_https` | Force all connections to use HTTP rather than HTTPS. |\n| `--newer` | With `--list`, show only new or updatable packages. |\n| `--verbose` | Verbose output mode. Errors, warnings and informational messages are printed. |\n| `--proxy={http | socks}` | Connect via a proxy of the given type: either `http` for high level protocols such as HTTP or FTP, or `socks` for a SOCKS (V4 or V5) proxy. |\n| `--proxy_host={`**\u003cvar translate=\"no\"\u003eIP_address\u003c/var\u003e**` | `**\u003cvar translate=\"no\"\u003eDNS_address\u003c/var\u003e**`}` | IP or DNS address of the proxy to use. |\n| `--proxy_port=`**\u003cvar translate=\"no\"\u003eport_number\u003c/var\u003e** | Proxy port number to connect to. |\n\n| **Note:** If you want to install packages for an operating system different from the current machine, set the [`REPO_OS_OVERRIDE`](/studio/command-line/variables#repo_os_override) environment variable to either `\"windows\"`, `\"macosx\"`, or `\"linux\"`."]]