You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.7 KiB
2.7 KiB
Build Process Quick Reference
Author: Matthew Raymer
Date: October 17, 2025
🚨 Critical Build Steps
# 1. Build web assets
npm run build
# 2. Sync with native projects (automatically fixes plugin paths)
npm run cap:sync
# 3. Build and deploy Android
cd android
./gradlew :app:assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk
adb shell am start -n com.timesafari.dailynotification.test/.MainActivity
⚠️ Why npm run cap:sync is Important
Problem: npx cap sync overwrites capacitor.plugins.json and capacitor.settings.gradle with incorrect paths.
Solution: The cap:sync script automatically:
- Runs
npx cap sync android - Fixes
capacitor.settings.gradle(corrects plugin path fromandroid/toandroid/plugin/) - Restores the DailyNotification plugin entry in
capacitor.plugins.json
Without the fix: Plugin detection fails, build errors occur, "simplified dialog" appears.
🔍 Verification Checklist
After build, verify:
capacitor.plugins.jsoncontains DailyNotification entry- System Status shows "Plugin: Available" (green)
- Plugin Diagnostics shows all 4 plugins
- Click events work on ActionCard components
- No "simplified dialog" appears
🛠️ Automated Build Script
Create scripts/build-and-deploy.sh:
#!/bin/bash
set -e
echo "🔨 Building web assets..."
npm run build
echo "🔄 Syncing with native projects..."
npm run cap:sync
# This automatically syncs and fixes plugin paths
echo "🏗️ Building Android app..."
cd android
./gradlew :app:assembleDebug
echo "📱 Installing and launching..."
adb install -r app/build/outputs/apk/debug/app-debug.apk
adb shell am start -n com.timesafari.dailynotification.test/.MainActivity
echo "✅ Build and deploy complete!"
🐛 Common Issues
| Issue | Symptom | Solution |
|---|---|---|
| Empty plugin registry | capacitor.plugins.json is [] |
Run npm run cap:sync or node scripts/fix-capacitor-plugins.js |
| Plugin not detected | "Plugin: Not Available" (red) | Check plugin registry, rebuild |
| Click events not working | Buttons don't respond | Check Vue 3 compatibility, router config |
| Inconsistent status | Different status in different cards | Use consistent detection logic |
📱 Testing Commands
# Check plugin registry
cat android/app/src/main/assets/capacitor.plugins.json
# Monitor native logs
adb logcat | grep -i "dailynotification\|capacitor\|plugin"
# Check app installation
adb shell pm list packages | grep dailynotification
Remember: Use npm run cap:sync instead of npx cap sync android directly - it automatically fixes the configuration files!