docs(testing): EMULATOR_GUIDE prerequisites, API 35, Apple Silicon; build.sh Android-only sync
EMULATOR_GUIDE.md: - Add "Checking and Installing Prerequisites" (how to check Node, npm, Java, ANDROID_HOME, adb, emulator, AVDs; install steps; reference to scripts/check-environment.js) - Use API 35 and Pixel8_API35 throughout to match project compileSdk/targetSdk - Document arm64-v8a for Apple Silicon and x86_64 for Intel; add troubleshooting for "x86_64 not supported on aarch64 host" - Bump version to 1.1.0 and last-updated date test-apps/daily-notification-test/scripts/build.sh: - When building only Android (--android / --run-android), run cap:sync:android instead of cap:sync so iOS pod install is skipped and Android build/run succeeds without fixing the iOS Podfile
This commit is contained in:
@@ -71,12 +71,21 @@ This checks Node, npm, Java, and `ANDROID_HOME`. It does **not** check `adb`, `e
|
|||||||
sdkmanager "platform-tools"
|
sdkmanager "platform-tools"
|
||||||
sdkmanager "emulator"
|
sdkmanager "emulator"
|
||||||
sdkmanager "platforms;android-35"
|
sdkmanager "platforms;android-35"
|
||||||
sdkmanager "system-images;android-35;google_apis;x86_64"
|
|
||||||
sdkmanager "build-tools;35.0.0"
|
sdkmanager "build-tools;35.0.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Create at least one AVD:
|
Install a system image that matches your host CPU:
|
||||||
|
- **Apple Silicon (M1/M2/M3, aarch64):** `sdkmanager "system-images;android-35;google_apis;arm64-v8a"`
|
||||||
|
- **Intel Mac / Windows / Linux (x86_64):** `sdkmanager "system-images;android-35;google_apis;x86_64"`
|
||||||
|
|
||||||
|
5. Create at least one AVD (use the same image type you installed):
|
||||||
|
|
||||||
|
**Apple Silicon:**
|
||||||
|
```bash
|
||||||
|
avdmanager create avd -n Pixel8_API35 -k "system-images;android-35;google_apis;arm64-v8a" -d "pixel_8"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Intel / x86_64:**
|
||||||
```bash
|
```bash
|
||||||
avdmanager create avd -n Pixel8_API35 -k "system-images;android-35;google_apis;x86_64" -d "pixel_8"
|
avdmanager create avd -n Pixel8_API35 -k "system-images;android-35;google_apis;x86_64" -d "pixel_8"
|
||||||
```
|
```
|
||||||
@@ -280,6 +289,16 @@ pkill -f emulator
|
|||||||
emulator -avd Pixel8_API35 -verbose
|
emulator -avd Pixel8_API35 -verbose
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### "x86_64 is not supported by the QEMU2 emulator on aarch64 host"
|
||||||
|
On Apple Silicon (M1/M2/M3), the emulator cannot run x86_64 system images. Use an ARM64 image and AVD instead:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sdkmanager "system-images;android-35;google_apis;arm64-v8a"
|
||||||
|
avdmanager delete avd -n Pixel8_API35 # if you already created an x86_64 AVD
|
||||||
|
avdmanager create avd -n Pixel8_API35 -k "system-images;android-35;google_apis;arm64-v8a" -d "pixel_8"
|
||||||
|
emulator -avd Pixel8_API35 -no-snapshot-load
|
||||||
|
```
|
||||||
|
|
||||||
#### ADB Connection Issues
|
#### ADB Connection Issues
|
||||||
```bash
|
```bash
|
||||||
# Check ADB connection
|
# Check ADB connection
|
||||||
|
|||||||
@@ -220,12 +220,24 @@ if ! npm run build; then
|
|||||||
fi
|
fi
|
||||||
log_info "Web assets built successfully"
|
log_info "Web assets built successfully"
|
||||||
|
|
||||||
# Step 2: Sync Capacitor
|
# Step 2: Sync Capacitor (Android-only when building only Android to avoid iOS pod install failure)
|
||||||
log_step "Syncing Capacitor with native projects..."
|
log_step "Syncing Capacitor with native projects..."
|
||||||
|
if [ "$BUILD_ALL" = true ]; then
|
||||||
if ! npm run cap:sync; then
|
if ! npm run cap:sync; then
|
||||||
log_error "Capacitor sync failed"
|
log_error "Capacitor sync failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
elif [ "$BUILD_ANDROID" = true ]; then
|
||||||
|
if ! npm run cap:sync:android; then
|
||||||
|
log_error "Capacitor sync (Android) failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ "$BUILD_IOS" = true ]; then
|
||||||
|
if ! npm run cap:sync:ios; then
|
||||||
|
log_error "Capacitor sync (iOS) failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
log_info "Capacitor sync completed"
|
log_info "Capacitor sync completed"
|
||||||
|
|
||||||
# Step 2.5: Ensure fix script ran (it should have via cap:sync, but verify for iOS)
|
# Step 2.5: Ensure fix script ran (it should have via cap:sync, but verify for iOS)
|
||||||
|
|||||||
Reference in New Issue
Block a user