Files
test_flutter/README.md
2026-04-10 03:11:20 +08:00

697 B

test_one

启动模拟器

查看可用模拟器

flutter devices

启动指定模拟器

# 根据设备 ID 启动
flutter emulators --launch <emulator_id>

# create 模拟器
flutter emulators --create --name test_phone --device "Pixel 4"
emulator -avd test_phone 
# 或直接运行,会自动选择已连接的设备
flutter run

常用命令

# 列出所有模拟器
xcrun simctl list devices

# 启动 iOS 模拟器
open -a Simulator

# 查看当前连接的设备
flutter devices

运行应用

# debug 模式运行
flutter run

# release 模式运行
flutter run --release

# 指定设备运行
flutter run -d <device_id>