Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.
日本語の概要は準備中です。原文の説明を表示しています。
Production-grade Android app development guide covering native (Kotlin/Java), cross-platform (Flutter, RN, KMM), and hybrid architectures.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
This skill guides production-grade Android and cross-platform (non-iOS) app development following practices used at big tech companies. It covers the entire development lifecycle — architecture, UI, code quality, testing, error handling, release, and maintenance.
references/ directory)Choose based on team, requirements, and platform targets. Do not recommend iOS-specific paths.
Best for: Android-only apps, hardware-intensive features, best-in-class UX, new projects.
references/native-android.mdBest for: Existing Java codebases, teams without Kotlin experience, legacy app maintenance, incremental Kotlin migration.
references/java-android.mdBest for: Android + Web (+ desktop) from one codebase, fast iteration, pixel-perfect custom UI.
references/flutter.mdBest for: Web + Android code sharing, JS/TS teams, rich ecosystem.
references/react-native.mdBest for: Sharing business logic across Android + Desktop + Web while keeping native Android UI.
references/kmm.mdBest for: Web-first teams, simple apps, PWA-like content apps.
references/hybrid.md| Requirement | Native Kotlin | Native Java | Flutter | RN | KMM | Hybrid |
|---|---|---|---|---|---|---|
| Android-only (new) | ✅ Best | ✅ | ✅ | ✅ | ✅ | ✅ |
| Android-only (existing Java) | ⚠️ migrate | ✅ Best | ❌ | ❌ | ⚠️ | ❌ |
| Android + Web | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ Best |
| Android + Desktop | ❌ | ❌ | ✅ | ⚠️ | ✅ | ⚠️ |
| Shared business logic only | N/A | N/A | N/A | N/A | ✅ Best | N/A |
| Native performance | ✅ | ✅ | ✅ | ⚠️ | ✅ | ❌ |
| JS/TS team | ❌ | ❌ | ❌ | ✅ Best | ❌ | ✅ |
| Custom pixel-perfect UI | ✅ | ⚠️ | ✅ Best | ⚠️ | ✅ | ❌ |
Every production Android project must separate UI, business logic, and data into distinct, independently testable layers.
app/
├── ui/ # Composables / Activities / Fragments / Screen states
├── presentation/ # ViewModels, UI State, UI Events
├── domain/ # Use cases, domain models, repository interfaces
├── data/ # Repository impl, remote (API), local (DB), mappers
└── di/ # Dependency injection modules
Data flow (unidirectional):
User Action → ViewModel/Store → Use Case → Repository → Data Source
↓
UI State (sealed class / StateFlow)
↓
Composable / View renders state
Native (MVVM + MVI):
StateFlow / SharedFlow for reactive statesealed class UiState + sealed class UiEventFlutter (BLoC or Riverpod):
Bloc or Cubit for business logic isolationAsyncNotifierProvider (Riverpod) for data + stateReact Native (Redux Toolkit or Zustand):
KMM:
commonMain holds domain + data layersexpect/actual for platform-specific implementations:app # Entry point, DI wiring
:core:ui # Design system, shared composables
:core:network # API client, interceptors
:core:database # Room / SQLDelight setup
:feature:home
:feature:profile
:feature:settings
Before writing screens, define:
MaterialTheme tokens; never hardcode colors/dimensionsCompositionLocal for theme, locale, hapticsremember / rememberSaveable correctly (saveable for UI state surviving rotation)LazyColumn/LazyVerticalGrid for lists; never Column with forEach for large dataLaunchedEffect, DisposableEffect, SideEffectcontentDescription or semantics { }TalkBack compatibility tested before every releasesp not dp for text)NavHost and SafeArgs equivalentgo_router with named routes and guardsNavigationProppopUpTo / launchSingleTopWindowSizeClass)WindowInfoTrackerWindowInsets handling required for Android 15+Kotlin:
data class, sealed class, object, enum class appropriately!! null assertions — use ?.let, ?: return, requireNotNull with messageCoroutineScope + Dispatcher explicitly; never GlobalScope@Stable / @Immutable on Compose state classes for smart recompositionJava:
@NonNull / @Nullable annotations on every method param and return typeObjects.requireNonNullbinding reference in Fragment's onDestroyView() to prevent memory leaksExecutorService (not AsyncTask — deprecated) for background work; or LiveData + Room's built-in threadingListAdapter + DiffUtil over manual notifyDataSetChanged() in RecyclerViewViewBinding — never findViewByIdDart (Flutter):
! without explicit null check abovecopyWithconst constructors on all stateless widgetsTypeScript (RN):
strict: true in tsconfig alwaysany — use unknown and narrowbuild.gradle.kts / pubspec.yaml / package.jsonActivity context stored in singletons)Never let exceptions propagate to the user silently or crash the app.
| Type | Strategy |
|---|---|
| Network errors | Retry with exponential backoff; show retry UI |
| Auth errors (401/403) | Refresh token → re-request → logout if fails |
| Validation errors | Show inline field errors immediately |
| Data parsing errors | Log + fallback to cached/default state |
| Unexpected crashes | Catch at top-level; show error screen + report |
| Background task failures | Retry via WorkManager; notify user if critical |
sealed class AppResult<out T> {
data class Success<T>(val data: T) : AppResult<T>()
data class Error(val exception: AppException) : AppResult<Nothing>()
}
sealed class AppException(msg: String) : Exception(msg) {
class NetworkException(msg: String) : AppException(msg)
class AuthException(msg: String) : AppException(msg)
class ParseException(msg: String) : AppException(msg)
class UnknownException(msg: String) : AppException(msg)
}
Use AppResult<T> as return type for all repository + use case functions. ViewModels map to UiState.Error.
Room / Drift / MMKV as single source of truthConnectivityManager and reflect in UI /\
/E2E\ ← 10% (UI tests: Espresso, Maestro, Appium)
/------\
/ Integr \ ← 20% (Repository, DB, API contract tests)
/----------\
/ Unit \ ← 70% (ViewModels, Use Cases, Utilities)
/--------------\
flutter_test + mocktail@testing-library/react-native + msw for API mockingMockWebServer (OkHttp)debug → dev API, logging on, no minification, debuggable
staging → staging API, logging on, minified, not debuggable
release → prod API, logging off, minified, signed
build.gradle.kts only — no Groovy DSL in new projectslibs.versions.toml) for all dependency versionsbuildConfig for environment-specific constantsPR Opened
└─ lint + unit tests + build debug APK [< 5 min]
Merge to main
└─ unit + integration tests + staging build [< 15 min]
└─ deploy to Firebase App Distribution (QA)
Release tag
└─ full test suite + E2E on device farm [< 45 min]
└─ build release AAB
└─ upload to Play Console (internal track)
└─ promote: internal → closed testing → open → production
Recommended CI: GitHub Actions, Bitrise, or CircleCI.
FrameMetrics APIdraw() / onMeasure() / compositionderivedStateOf in Compose to avoid unnecessary recompositionsActivity / Context references in ViewModels or singletons| Bug | Likely Cause | Fix |
|---|---|---|
| ANR | Main thread I/O / long computation | Move to coroutine/Dispatcher.IO |
| Memory leak | Context stored in singleton | Use applicationContext; WeakRef |
| Crash on rotation | ViewModel not used; state not saved | rememberSaveable / ViewModel |
| UI lag | Recomposition loops | derivedStateOf, stable params |
| Blank screen after API call | Error swallowed silently | Check error state propagation |
| Deep link not working | Manifest intent-filter missing | Verify adb shell am start test |
| Push notification silent | Background restrictions | Test on real devices across OEMs |
Log.d in release builds)Follow this phase structure for any new Android project:
For stack-specific deep dives, read:
references/native-android.md — Kotlin, Compose, Room, Hilt, Coroutinesreferences/java-android.md — Java, XML Views, ViewBinding, LiveData, Retrofit, Room, Hilt, migration pathreferences/flutter.md — Dart, BLoC/Riverpod, Drift, go_routerreferences/react-native.md — TypeScript, RN architecture, Hermes, New Architecturereferences/kmm.md — KMM shared modules, SQLDelight, Ktor, Compose Multiplatformreferences/hybrid.md — Capacitor, Ionic, PWA considerationsまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.
日本語の概要は準備中です。原文の説明を表示しています。
Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.
日本語の概要は準備中です。原文の説明を表示しています。
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
日本語の概要は準備中です。原文の説明を表示しています。
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
日本語の概要は準備中です。原文の説明を表示しています。
Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
日本語の概要は準備中です。原文の説明を表示しています。
Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.
日本語の概要は準備中です。原文の説明を表示しています。