android-native-dev

Guides Android native app development with Kotlin, Jetpack Compose, and Material Design 3 standards.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/RavitejaKarra24/dotfiles --skill android-native-dev-ravitejakarra24
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-native-dev
Source: https://github.com/RavitejaKarra24/dotfiles/tree/main/pi/.pi/agent/skills/android-native-dev
Command: npx skills add https://github.com/RavitejaKarra24/dotfiles --skill android-native-dev-ravitejakarra24

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building Android apps involves many pitfalls: Gradle misconfiguration, threading mistakes, Compose context errors, build failures, and Material Design non-compliance. This Skill provides a structured reference covering project setup, Kotlin coding standards, Compose patterns, build troubleshooting, and M3 design guidelines so developers avoid common errors from the start. ## Core Features & Use Cases - Project Configuration: Checklists for Gradle setup, gradle.properties, build variants, product flavors, and dependency management with Compose BOM. - Kotlin & Compose Standards: Null safety, coroutine threading rules, state management, lifecycle handling, and common syntax pitfalls with correct/incorrect code examples. - Build Error Diagnosis: Quick-reference tables mapping error keywords to causes and fixes, plus debugging commands like ./gradlew dependencies. - Material Design 3 Compliance: Color contrast ratios, touch target sizes, 8dp grid, typography scale, and anti-patterns, with deep-dive references for accessibility, motion, adaptive screens, performance, privacy, and testing. - Use Case: When starting a new Android app or fixing a failing build, consult this Skill to verify the project structure, configure flavors (dev/staging/prod), and ensure UI code meets Google Play quality thresholds. ## Quick Start Ask the assistant to review your Android project setup or Compose screen code against the android-native-dev guidelines before writing business logic.

Frequently Asked Questions about android-native-dev

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

FAQPage Schema
How do I configure build variants and product flavors in Android Gradle?

Define flavorDimensions and productFlavors in app/build.gradle.kts, setting applicationIdSuffix and buildConfigField per flavor. Build specific variants with commands like ./gradlew assembleDevDebug or assembleProdRelease.

How do I handle threading with Kotlin coroutines in Android ViewModels?

Launch coroutines in viewModelScope on the Main dispatcher for UI updates, and wrap network or file operations in withContext(Dispatchers.IO). Never update UI state from an IO thread or run blocking calls on Main.

What are the Material Design 3 touch target and contrast requirements?

Touch targets must be at least 48x48dp with 8dp spacing, and 56dp or larger for kids apps. Text requires 4.5:1 contrast ratio, large text 3:1, and UI components 3:1 against their backgrounds.

Why does my Android build fail with Unresolved reference or Duplicate class errors?

Unresolved reference usually means a missing import or dependency, while Duplicate class indicates dependency version conflicts. Run ./gradlew :app:dependencies to inspect the tree, then ./gradlew clean assembleDebug to rebuild.

Does Jetpack Compose testing require an emulator?

No, Compose UI tests can run locally on the JVM using Robolectric with createComposeRule, or on devices via instrumentation tests. Use testTag modifiers for stable selectors and waitForIdle or waitUntil for async assertions.

What are the Google Play crash and ANR rate thresholds?

Google Play flags apps exceeding 1.09% user-perceived crash rate or 0.47% ANR rate overall, reducing store visibility. Prevent ANRs by keeping network, database, and file I/O off the main thread.