一键导入
mobiai-android-build
Use when building an Android project, configuring flavors or variants, troubleshooting build failures, or managing Gradle dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when building an Android project, configuring flavors or variants, troubleshooting build failures, or managing Gradle dependencies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
first community fixture skill
second community fixture skill
third community fixture skill
Actualiza el binario `mobiai` a la última versión publicada en GitHub Releases. Usá esta skill cuando el banner de SessionStart muestre "MobiAI update available" o cuando el usuario pida explícitamente actualizar MobiAI.
Use when starting any conversation — establishes how to find and invoke MobiAI skills, requiring `Skill` tool invocation before ANY response including clarifying questions, git/file reads, or code exploration
test fixture
| name | mobiai-android-build |
| description | Use when building an Android project, configuring flavors or variants, troubleshooting build failures, or managing Gradle dependencies. |
| license | MIT |
| compatibility | ["claude-code","cursor","copilot","codex"] |
| platforms | ["android"] |
Expert knowledge for building Android projects with Gradle.
# Debug APK (default flavor)
./gradlew assembleDebug
# Specific flavor
./gradlew assemble<Flavor>Debug
# Example: ./gradlew assembleFreeDebug
# Release APK
./gradlew assemble<Flavor>Release
# App Bundle (for Play Store)
./gradlew bundle<Flavor>Release
Use this to quickly verify code compiles without building a full APK:
./gradlew compile<Flavor>DebugKotlin --no-daemon
./gradlew test<Flavor>DebugUnitTest --no-daemon
./gradlew connected<Flavor>DebugAndroidTest
./gradlew clean assembleDebug
Android builds are a combination of Build Type × Product Flavor.
debug — debuggable, no minification, debug signingrelease — minified (R8/ProGuard), release signingFlavors are defined in app/build.gradle(.kts) under productFlavors. Common patterns:
// Example: country-based flavors
flavorDimensions += "country"
productFlavors {
create("arg") { dimension = "country"; applicationIdSuffix = ".arg" }
create("mx") { dimension = "country"; applicationIdSuffix = ".mx" }
}
To find available flavors:
grep -r "productFlavors" app/build.gradle* --include="*.gradle*" -A 20
Or list all build variants:
./gradlew tasks --all | grep assemble
# Single APK
adb install -r app/build/outputs/apk/<flavor>/debug/app-<flavor>-debug.apk
# Split APKs (when using multiple APK output)
adb install-multiple app-base.apk app-config.apk
# Replace existing installation
adb install -r <path-to-apk>
Projects often use branch naming conventions tied to versions:
# Check available release branches
git branch -r | grep release
# Common patterns:
# release/v3.2.x
# release/3.2.0
# release/1.0.0-rc1
To build a specific version:
git checkout <branch>./gradlew dependencies --configuration <flavor>DebugRuntimeClasspath
configurations.all {
resolutionStrategy.force("com.example:library:1.2.3")
}
# In gradle.properties
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
./gradlew clean
rm -rf .gradle/
rm -rf ~/.gradle/caches/
# Check Kotlin version
grep -r "kotlin" gradle/libs.versions.toml build.gradle* --include="*.toml" --include="*.gradle*" | grep version
# Check which JDK Gradle uses
./gradlew --version
# Set JDK explicitly
export JAVA_HOME=/path/to/jdk
Automatic — uses ~/.android/debug.keystore
Usually configured in app/build.gradle(.kts):
grep -r "signingConfigs" app/build.gradle* -A 10
Never commit signing credentials to git.
grep -r "isMinifyEnabled\|minifyEnabled" app/build.gradle* --include="*.gradle*"
Located in proguard-rules.pro or consumer-rules.pro. Common issues:
@Keep or keep rules