android-native-dev
Android native application development and UI design guide. Covers Material Design 3, Kotlin/Compose development, project configuration, accessibility, and build troubleshooting. Read this before Android native application development.
Security Assessment
About android-native-dev
A guide for Android native application development and UI design, intended to be read before starting Android native work. It covers Material Design 3, Kotlin and Jetpack Compose development, project configuration, accessibility, and build troubleshooting, drawing on Material Design 3 guidelines, Android developer documentation, Google Play quality guidelines, and WCAG accessibility guidelines. It opens with a project scenario assessment that classifies the current state - empty directory, project with a Gradle Wrapper, Android Studio project, or incomplete project - and prescribes the right approach for each, with a key principle that 'gradlew assembleDebug' should succeed before any business logic is written.
Project configuration is detailed concretely. It lists a required-files checklist (gradle.properties, settings.gradle.kts, root and module build.gradle.kts, the Gradle wrapper, AndroidManifest.xml, MainActivity.kt, and res resources) and shows a gradle.properties enabling AndroidX and Jetifier with build optimization and adjustable JVM memory settings. Dependencies are declared using the Compose BOM alongside activity-compose and lifecycle-viewmodel-compose. A substantial section covers build variants and product flavors: defining flavor dimensions, creating dev/staging/prod flavors with applicationIdSuffix, versionNameSuffix, buildConfigField, and resValue, configuring debug and release build types, the '{flavor}{BuildType}' variant naming, and Gradle commands to list, assemble, and install specific variants. It also notes that from AGP 8.0 BuildConfig must be explicitly enabled via buildFeatures, shows flavor-specific source sets, and demonstrates multiple flavor dimensions.
Kotlin development standards round it out. A naming-convention table covers classes, functions, constants, packages, and Composables, and code standards emphasize null safety (preferring safe calls and defaults or let over the non-null assertion operator) and disciplined exception handling rather than broad try-catch blocks that swallow errors. Practical notes address build memory tuning for OutOfMemoryError and other common build issues.
FAQ
What should I verify before writing business logic?
That 'gradlew assembleDebug' succeeds, and that gradle.properties exists with AndroidX configured. The skill assesses the project's starting state first to decide whether full initialization is needed.
How does the guide recommend managing Compose dependency versions?
By using the Compose BOM, declaring the compose-bom platform and then unversioned Compose artifacts like compose.ui and material3, alongside activity-compose and lifecycle-viewmodel-compose.
How are build variants named?
As '{flavor}{BuildType}', for example devDebug or prodRelease. Flavors such as dev, staging, and prod are created under a flavor dimension, each able to set applicationIdSuffix, versionNameSuffix, and buildConfigField values.
Why might BuildConfig not be available, and how do I enable it?
Starting from AGP 8.0, BuildConfig is no longer generated by default. You must enable it explicitly by setting buildFeatures { buildConfig = true } in build.gradle.kts.
What does the guide say about null safety in Kotlin?
It advises avoiding the non-null assertion operator because it may crash, and instead using safe calls with a default value or let handling.
All Files
10 filesInstall android-native-dev
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
minimax-ai/skills