install
Part of the Command Reference.
asd <name> [version]
The default action — running asd with a bare package name (no leading
-) installs it. This is the only command without an explicit flag.
Arguments
name— the package path from the registry, e.g.ndk,build-tools,platform-tools, or a;-qualified path likeplatforms;android-34.version(optional) — an exact version string, e.g.27.0.12077973. If omitted, the first matching entry in the registry is used.
Examples
asd ndk # latest matching NDK entry
asd ndk 27.0.12077973 # a specific NDK version
asd build-tools 37.0.0-rc2
asd platform-tools
asd "platforms;android-34"
What it does
- Ensures
$ASD_CSVexists, downloading the registry first if needed. - Looks up
name(andversion, if given) in the registry. - Downloads the archive with
aria2c, using$ASD_ARIA2C_OPTS. - Verifies the download’s SHA-1 against the checksum in the registry, if one is present.
- Extracts the archive under
$ANDROID_HOME/<package-path>. - Flattens the result if the archive contained a single wrapping subdirectory.
- Writes a
package.xmldescribing the component, so the Android SDK tooling (andasd --installed) recognizes it.
Errors
Error: Package 'foo' (Version: latest) not found.
The name (and version, if given) didn’t match anything in the registry —
double check with asd --list.