android-dev

Guides Gradle builds, SDK setup, and adb debugging in Android flake template projects.

4|Updated May 20, 2024
One-click install
npx skills add https://github.com/SpreadZhao/spreadconfig --skill android-dev-spreadzhao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-dev
Source: https://github.com/SpreadZhao/spreadconfig/tree/main/templates/android/skills/local/android-dev
Command: npx skills add https://github.com/SpreadZhao/spreadconfig --skill android-dev-spreadzhao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android development inside Nix flake-based projects requires coordinating the Gradle wrapper, Android SDK paths, adb devices, and emulator tooling, and misconfigured environments cause confusing build and test failures. ## Core Features & Use Cases - Environment Setup: Enter the dev shell with nix develop or direnv allow, with ANDROID_HOME and platform-tools automatically on PATH. - Build and Test Workflows: Run ./gradlew assembleDebug, test, and connectedDebugAndroidTest with the project wrapper preferred over the system Gradle. - Device Debugging: Use adb devices, adb logcat, scrcpy, and jadx for runtime crash analysis and APK inspection. - Use Case: A developer clones a project from the spreadconfig Android template, runs scripts/android-doctor to verify the SDK and adb, then builds and deploys a debug APK to a connected phone. ## Quick Start Enter the project dev shell and ask the assistant to diagnose why my Android build fails when running the Gradle wrapper.

Frequently Asked Questions about android-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an Android app in a Nix flake project?

Enter the dev shell with nix develop or direnv allow, then run ./gradlew assembleDebug using the project Gradle wrapper. The shell provides the Android SDK path and platform-tools on PATH automatically.

How do I debug an Android app on a physical device with adb?

Run adb devices first to confirm the device is connected, then use adb logcat for runtime crashes and framework errors. Use scrcpy when you need to view or control the physical device screen.

Why is my Android SDK not found in the dev shell?

ANDROID_HOME and ANDROID_SDK_ROOT default to ${XDG_LIB_HOME:-$HOME/Lib}/Android/Sdk. Run scripts/android-doctor to print the SDK path, verify adb, and check Gradle, then report the exact missing path or tool.

Should I use the Gradle wrapper or system gradle?

Prefer the project Gradle wrapper ./gradlew whenever it exists in the project. Use the shell's gradle package only when the project has no wrapper, since the wrapper pins the correct Gradle version.

Can I install or update Android SDK packages globally?

No, do not install or update SDK packages globally unless explicitly asked. The skill assumes Android Studio manages the SDK; if a component is missing, report the exact missing path or tool first.