android-native-dev
できること
このスキルは、KotlinとComposeでネイティブのAndroidアプリを作るための実践的な手引きです。正しいプロジェクト設定と、分かりやすく使いやすいデザインがほしい開発者向けです。
使う場面
- ✓空のフォルダーから新しいAndroidアプリを始めるとき。
- ✓GradleのAndroidビルドのエラーを直す必要があるとき。
- ✓アプリをMaterial Design 3とアクセシビリティのルールに従わせたいとき。
スキルのリンク
https://github.com/MiniMax-AI/skills/blob/main/skills/android-native-dev/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Material Design 3に従ったホーム画面を持つ、Kotlinの新しいAndroidアプリを作りたいです。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、まずプロジェクトの状態を確認します。そのうえで、Gradleのファイルとアプリの構成を作るか、不足している部分を補います。アプリのロジックを追加する前に、デバッグビルドが動くことを確かめます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
1. Project Scenario Assessment
Before starting development, assess the current project state:
| Scenario | Characteristics | Approach |
|---|---|---|
| Empty Directory | No files present | Full initialization required, including Gradle Wrapper |
| Has Gradle Wrapper | gradlew and gradle/wrapper/ exist |
Use ./gradlew directly for builds |
| Android Studio Project | Complete project structure, may lack wrapper | Check wrapper, run gradle wrapper if needed |
| Incomplete Project | Partial files present | Check missing files, complete configuration |
Key Principles:
- Before writing business logic, ensure
./gradlew assembleDebugsucceeds - If
gradle.propertiesis missing, create it first and configure AndroidX
1.1 Required Files Checklist
MyApp/
├── gradle.properties # Configure AndroidX and other settings
├── settings.gradle.kts
├── build.gradle.kts # Root level
├── gradle/wrapper/
│ └── gradle-wrapper.properties
├── app/
│ ├── build.gradle.kts # Module level
│ └── src/main/
│ ├── AndroidManifest.xml
│ ├── java/com/example/myapp/
│ │ └── MainActivity.kt
│ └── res/
│ ├── values/
│ │ ├── strings.xml
│ │ ├── colors.xml
│ │ └── themes.xml
│ └── mipmap-*/ # App icons
2. Project Configuration
2.1 gradle.properties
# Required configuration
android.useAndroidX=true
android.enableJetifier=true
# Build optimization
org.gradle.parallel=true
kotlin.code.style=official
# JVM memory settings (adjust based on project size)
# Small projects: 2048m, Medium: 4096m, Large: 8192m+
# org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
Note: If you encounter
OutOfMemoryErrorduring build, increase-Xmxvalue. Large projects with many dependencies may require 8GB or more.
2.2 Dependency Declaration Standards
dependencies {
// Use BOM to manage Compose versions
implementation(platform("androidx.compose:compose-bom:2024.02.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material3:material3")
// Activity & ViewModel
implementation("androidx.activity:activity-compose:1.8.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
}
2.3 Build Variants & Product Flavors
Product Flavors allow you to create different versions of your app (e.g., free/paid, dev/staging/prod).
Configuration in app/build.gradle.kts:
android {
// Define flavor dimensions
flavorDimensions += "environment"
productFlavors {
create("dev") {
dimension = "environment"
applicationIdSuffix = ".dev"
versionNameSuffix = "-dev"
// Different config values per flavor
buildConfigField("String", "API_BASE_URL", "\"https://dev-api.example.com\"")
buildConfigField("Boolean", "ENABLE_LOGGING", "true")
// Different resources
resValue("string", "app_name", "MyApp Dev")
}
create("staging") {
dimension = "environment"
applicationIdSuffix = ".staging"
versionNameSuffix = "-staging"
buildConfigField("String", "API_BASE_URL", "\"https://staging-api.example.com\"")
buildConfigField("Boolean", "ENABLE_LOGGING", "true")
resValue("string", "app_name", "MyApp Staging")
}
create("prod") {
dimension = "environment"
// No suffix for production
buildConfigField("String", "API_BASE_URL", "\"https://api.example.com\"")
buildConfigField("Boolean", "ENABLE_LOGGING", "false")
resValue("string", "app_name", "MyApp")
}
}
buildTypes {
debug {
isDebuggable = true
isMinifyEnabled = false
}
release {
isDebuggable = false
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
}
Build Variant Naming: {flavor}{BuildType} → e.g., devDebug, prodRelease
Gradle Build Commands:
# List all available build variants
./gradlew tasks --group="build"
# Build specific variant (flavor + buildType)
./gradlew assemble
よくある質問
エージェントは最初に何を確認しますか?
フォルダーが空か、Gradleラッパーがあるか、途中まで作られたプロジェクトかどうかを確認するよう求めています。
Gradleラッパーは必要ですか?
ビルドにはラッパーを使い、なければ作るよう求めています。
アクセシビリティにも対応していますか?
はい。Androidの画面に関するアクセシビリティのガイドを含みます。
詳細
作者による元の説明
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.
repo: MiniMax-AI/skills
人気
- GitHubのスター
- 14k
- ランキング
- #11286
- ライセンス
- MIT
- 更新日
- 2026/4/18
コメント
- …
このリポジトリの他のスキル
design-style-skill
14kエージェントが、スライドの見た目を一つの統一されたスタイルに決められるよう支援します。シャープで引き締まったものから、やわらかく丸みのあるもの、ゆったりしたものまで選べます。
ppt-editing-skill
14kエージェントが既存のPowerPointファイルやテンプレートを安全に編集できるよう支援します。文字の変更、スライドの並べ替えや削除を行い、有効な資料として組み直します。
ppt-orchestra-skill
14kエージェントが、PowerPointの資料全体を作る前に計画できるよう支援します。各スライドを標準的なページの種類に分け、種類のばらつきと文章の品質を確認します。
slide-making-skill
14kエージェントが、PptxGenJSを使ったJavaScriptで一枚のPowerPointスライドを作れるよう支援します。レイアウト、文字、画像、グラフ、フォントを扱い、ネイティブの.pptxファイルを作ります。
似ているスキル
android-clean-architecture
280kエージェントがAndroidプロジェクトを効率よく整理できるようにします。コードを構造化して、保守や新機能の開発をしやすくします。
compose-multiplatform-patterns
280kエージェントがKMPプロジェクトでCompose MultiplatformとJetpack Composeのパターンを使えるようにします。状態管理、ナビゲーション、テーマ設定、パフォーマンスを扱います。
dart-flutter-patterns
280kエージェントがDartとFlutterのアプリ向けのコードを書けるようにします。最新のパターンを使い、堅牢で管理しやすいアプリを作ります。