android-build
Set up, build, sign, install and debug Android apps on this phone.
от aether-aiagent★ 45 звёзд на GitHub
Установить android-build в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Android build (on this phone)
Build real APKs without a PC. Install the tools once with one approval card, build, then install and test. Fix the first real error. Do not clean the universe first.
When to use
- The user wants to create, build, sign, install or run an Android app
- assembleDebug or a manual build failed ("could not find", SDK, manifest, aapt2, d8, duplicate class)
- A release APK or AAB is needed for GitHub or Google Play
When not to use
- The app built and installed but crashes (android-crash)
- Only Compose UI work in an existing buildable project (android-compose)
1. Get the tools (once)
- Check what exists:
env_status, thenshell:java -version; d8 --version; aapt2 version; ls $HOME/android-sdk/platforms. If all four answer and anandroid.jaris listed for the API you need, skip to step 2. - Otherwise call
android_sdk_install. It shows one card and installs OpenJDK 21, D8, aapt2 and apksigner from the package repository, plusandroid.jarfrom Google's SDK repository. Passplatform(the project's compileSdk, default 35) andgradle=trueonly for Gradle projects. Do not install those pieces one by one withpkg_install. - If the Linux environment is not installed, say so once. The conversation offers the install action. Never tell the user to move to a PC because a tool is missing.
- Verify with the commands above. A package marker is not proof; a command that runs is.
2. Pick the route
- A, no Gradle: a plain Java and XML app, or a new app where the user does not need Kotlin, Compose or Maven libraries. Builds in seconds. Use it by default for "make me a small app".
- B, Gradle: the project has
gradlew,build.gradleorbuild.gradle.kts, or needs Kotlin, Compose, AndroidX or other dependencies. Slow and memory hungry. Readreferences/gradle-on-device.mdbefore the first build.
Route A: build without Gradle
- New project: copy the files under
templates/hello-java/withskill_view(name="android-build", file_path="templates/hello-java/<file>")andwrite_file. Savegitignore.txtas.gitignore. Rename the package in the manifest and the Java path together. Check:packagein the manifest matches the folder undersrc/. - Once per project, copy
scripts/build-apk.shthe same way into the project root. shell:sh build-apk.shfrom the project root. It runs aapt2, javac, d8, adds the dex, signs with a debug key and verifies. Check: the last lines printAPK: <path>.- On an error, read the first message only. javac gives
file:line; aapt2 names the resource or manifest line. Fix withedit_file, re-run the same command. - Limits: Java only, plain jars in
libs/are supported, AARs are not. Kotlin, Compose or AndroidX means route B.
Route B: build with Gradle
Follow references/gradle-on-device.md. In short: use ./gradlew when it exists, pass the aapt2 override on the command line, cap memory, run it with shell_background, and expect the first build to download hundreds of MB.
Install and run
- Tell the user the APK path. Copy it somewhere a file manager can reach when needed:
cp <apk> /sdcard/Download/. - Install, in this order:
- With Shizuku or root (check
env_status):pm install -r <apk>. Check: output containsSuccess. - Otherwise ask the user to open the APK from the Files screen or any file manager and tap Install. The Play Store build of Aether cannot install packages itself, a file manager can.
- With Shizuku or root (check
- Confirm before claiming it is installed:
pm list packages <package>when privileged, or the user's confirmation. - Launch with
monkey -p <package> -c android.intent.category.LAUNCHER 1(privileged), or ask the user to open it. Thenread_logcatwithpackage_nameand fix crashes with theandroid-crashskill.
Release (GitHub and Google Play)
Read references/release.md. A signed APK works for GitHub Releases. Google Play needs an AAB, which only the Gradle route produces. Never print, commit or put a release keystore or its password in the project.
Pitfalls
ANDROID_JARand$HOME/android-sdklive under the Aether prefix. Do not search/sdcardfor them or invent Termux paths such as/data/data/com.termux/....- Do not download Google's build-tools zip. Its aapt2, aidl and zipalign are x86 binaries and will not run here. The aarch64
aapt2comes fromandroid_sdk_install. resources.arscmust stay stored and 4-byte aligned for targetSdk 30 and up.build-apk.shappends the dex last to keep it that way. Do not re-zip the APK withziporjar cf.- Never accept Android SDK licenses silently. Ask the user first (see the Gradle reference).
- If a basic command exits 126 or 127, run
env_statusonce and follow its diagnosis. Do not change permissions broadly or reinstall Linux as a first response. - Do not use
--offlineunless the error is clearly a network failure.
Verification
The build command prints an APK path, apksigner verify passed, and ins
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/gradle-on-device.md
- references/release.md
- scripts/build-apk.sh
- templates/hello-java/AndroidManifest.xml
- templates/hello-java/gitignore.txt
- templates/hello-java/res/values/strings.xml
- templates/hello-java/src/com/example/hello/MainActivity.java
FAQ
Что делает скилл android-build?
Set up, build, sign, install and debug Android apps on this phone.
Как установить скилл android-build?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл android-build запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…