移动端 开发
- 作者仓库星标 0
- 作者仓库 skills-registry
Mobile Development
Stack
Expo 54, React Native 0.81, expo-router (file-based routing), Tamagui v4 (UI), TypeScript strict mode.
Local Build Prerequisites
Required to run expo run:android or expo prebuild:
| Requirement | Check | Install |
|---|---|---|
| Java JDK 17 | java -version (must show 17.x) |
brew install openjdk@17 |
| Android SDK | echo $ANDROID_HOME (must be set) |
mise run install |
If expo run:android fails with a Java error:
brew install openjdk@17
export JAVA_HOME="$(brew --prefix openjdk@17)/libexec/openjdk.jdk/Contents/Home"
export PATH="$JAVA_HOME/bin:$PATH"
If expo run:android fails with ANDROID_HOME not set or SDK not found:
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$PATH"
Both are set permanently by mise run install. If missing, re-run it or add to ~/.zshrc manually.
iOS builds require Xcode (App Store). No additional toolchain needed beyond Xcode.
Imports
Use @/ path alias for project root: @/lib/supabase, @/lib/posthog.
UI Components
Use Tamagui components with shorthand props. Never use raw React Native View/Text.
// ✅
import { YStack, XStack, Text, Button, Card, Spinner, ScrollView } from 'tamagui';
<YStack gap="$4" p="$4">
<Text fos="$6" fow="bold">Title</Text>
<Button>Action</Button>
</YStack>
// ❌
import { View, Text } from 'react-native';
Common shorthand: bg (background), p/px/py (padding), m/mt (margin), br (borderRadius), bw (borderWidth), boc (borderColor), fos (fontSize), fow (fontWeight), col (color), ai (alignItems), jc (justifyContent), gap, elevate, bordered.
Routing
File-based via expo-router:
app/_layout.tsx— layout wrappers (Stack, Tabs)app/index.tsx— home screenapp/settings.tsx— named route
Use Stack with headerShown: false (current convention).
New Screen
import { YStack, Text } from 'tamagui';
export default function MyScreen() {
return (
<YStack f={1} ai="center" jc="center" bg="$background">
<Text>My Screen</Text>
</YStack>
);
}
Supabase
import { supabase } from '@/lib/supabase';
Single shared client. Uses EXPO_PUBLIC_SUPABASE_URL and EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY.
Theme
Default theme is dark. TamaguiProvider wraps the app in _layout.tsx with defaultTheme="dark".
Environment Variables
All public config uses EXPO_PUBLIC_* prefix. Access via process.env.EXPO_PUBLIC_*.
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: Ampli-Group/agentic-mobile-blueprint — distributed by TomeVault.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- Shell 执行
- 读取环境变量
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Expo 54, React Native 0.81, expo-router (file-based routing), Tamagui v4 (UI), TypeScript strict mode.
Required to run expo run:android or expo prebuild: Requirement · Check · Install Java JDK 17 · java -version (must show 17.x) · brew install openjdk@17
Use @/ path alias for project root: @/lib/supabase, @/lib/posthog.
Use Tamagui components with shorthand props. Never use raw React Native View/Text. Common shorthand: bg (background), p/px/py (padding), m/mt (margin), br (borderRadius), bw (borderWidth), boc (borderColor), fos (fontSize), fow (fontWeight), col (color), ai…
File-based via expo-router: app/layout.tsx — layout wrappers (Stack, Tabs) app/index.tsx — home screen
New Screen
# Mobile Development
## Stack
Expo 54, React Native 0.81, expo-router (file-based routing), Tamagui v4 (UI), TypeScript strict mode.
## Local Build Prerequisites
Required to run `expo run:android` or `expo prebuild`:
| Requirement | Check | Install |
|---|---|---|
| Java JDK 17 | `java -version` (must show `17.x`) | `brew install openjdk@17` |
| Android SDK | `echo $ANDROID_HOME` (must be set) | `mise run install` |
If `expo run:android` fails with a Java error:
```bash
brew install openjdk@17
export JAVA_HOME="$(brew --prefix openjdk@17)/libexec/openjdk.jdk/Contents/Home"
export PATH="$JAVA_HOME/bin:$PATH"
```
If `expo run:android` fails with `ANDROID_HOME not set` or SDK not found:
```bash
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$PATH"
```
Both are set permanently by `mise run install`. If missing, re-run it or add to `~/.zshrc` manually.
iOS builds require Xcode (App Store). No additional toolchain needed beyond Xcode.
## Imports
Use `@/` path alias for project root: `@/lib/supabase`, `@/lib/posthog`.
## UI Components
Use Tamagui components with shorthand props. Never use raw React Native `View`/`Text`.
```tsx
// ✅
import { YStack, XStack, Text, Button, Card, Spinner, ScrollView } from 'tamagui';
<YStack gap="$4" p="$4">
<Text fos="$6" fow="bold">Title</Text>
<Button>Action</Button>
</YStack>
// ❌
import { View, Text } from 'react-native';
```
Common shorthand: `bg` (background), `p`/`px`/`py` (padding), `m`/`mt` (margin), `br` (borderRadius), `bw` (borderWidth), `boc` (borderColor), `fos` (fontSize), `fow` (fontWeight), `col` (color), `ai` (alignItems), `jc` (justifyContent), `gap`, `elevate`, `bordered`.
## Routing
File-based via expo-router:
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Stack → Local Build Prerequisites → Imports → UI Components → Routing → New Screen
要点 -> Expo 54, React Native 0.81, expo-router (file-based routing), Tamagui v4 (UI), TypeScript strict mode. · Both are set permanently by mise run install. · iOS builds require Xcode (App Store). · Use @/ path alias for project root: @/lib/supabase, @/lib/posthog. · Use Tamagui components with shorthand props. · Use Stack with headerShown: false (current convention). · Single shared client. · Default theme is dark.
文件/命令 -> expo run:android · expo prebuild · java -version · 17.x · brew install openjdk@17 · echo $ANDROIDHOME · mise run install · ANDROIDHOME not set
内容 SHA-256 -> ce5b8f7558f5
原文结构
适用与边界
原文中的明确线索
expo run:android、expo prebuild、java -version、17.x、brew install openjdk@17、echo $ANDROIDHOME、mise run install、ANDROIDHOME not set