xiaohongshu
xiaohongshu
build-android-apk
自动化构建 React Native Android APK。包括依赖检查、Debug/Release 构建、设备安装。使用此 Skill 来构建 APK、测试安装、或排查构建问题。
Full skill instructions
| 项目 | 值 |
|---|---|
| 应用 ID | com.cretas.foodtrace |
| 前端目录 | frontend/CretasFoodTrace |
| 构建脚本 | scripts/build-android-apk.sh |
cd /Users/jietaoxie/my-prototype-logistics
# Debug APK(推荐测试)
./scripts/build-android-apk.sh
# Release APK
./scripts/build-android-apk.sh -t release
# 构建并安装到设备
./scripts/build-android-apk.sh -c -i
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
export ANDROID_HOME=/Users/jietaoxie/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
cd frontend/CretasFoodTrace
# 1. 安装依赖 + prebuild
npm install
npx expo prebuild --platform android
# 2. 构建 APK
cd android
./gradlew assembleDebug --no-daemon # Debug
./gradlew assembleRelease --no-daemon # Release
# 3. APK 输出位置
ls app/build/outputs/apk/debug/app-debug.apk
ls app/build/outputs/apk/release/app-release.apk
$ANDROID_HOME/platform-tools/adb devices # 检查设备
$ANDROID_HOME/platform-tools/adb install -r app-debug.apk # 安装
$ANDROID_HOME/platform-tools/adb shell am start -n com.cretas.foodtrace/.MainActivity
| 问题 | 解决方案 |
|---|---|
JAVA_HOME not set | export JAVA_HOME=...jdk-17.jdk/Contents/Home |
SDK location not found | export ANDROID_HOME=~/Library/Android/sdk |
No connected devices | 启动模拟器: $ANDROID_HOME/emulator/emulator -avd <name> |
| Build failed | ./gradlew clean 或删除 .gradle 目录 |
| Out of memory | 增加 gradle.properties 中 org.gradle.jvmargs |
cd frontend/CretasFoodTrace/android
./gradlew --stop && ./gradlew clean
rm -rf ~/.gradle/caches .gradle app/build
# 生成密钥库
keytool -genkeypair -v -storetype PKCS12 -keystore cretas-release.keystore \
-alias cretas -keyalg RSA -keysize 2048 -validity 10000
# 配置 android/gradle.properties
MYAPP_RELEASE_STORE_FILE=cretas-release.keystore
MYAPP_RELEASE_KEY_ALIAS=cretas
MYAPP_RELEASE_STORE_PASSWORD=your_password
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience