chore: commit to move to laptop
This commit is contained in:
@@ -9,26 +9,26 @@
|
||||
# 1. Build web assets
|
||||
npm run build
|
||||
|
||||
# 2. Sync with native projects
|
||||
npx cap sync android
|
||||
# 2. Sync with native projects (automatically fixes plugin paths)
|
||||
npm run cap:sync
|
||||
|
||||
# 3. 🔧 FIX PLUGIN REGISTRY (REQUIRED!)
|
||||
node scripts/fix-capacitor-plugins.js
|
||||
|
||||
# 4. Build and deploy Android
|
||||
# 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 Step 3 is Critical
|
||||
## ⚠️ Why `npm run cap:sync` is Important
|
||||
|
||||
**Problem**: `npx cap sync` overwrites `capacitor.plugins.json` and removes custom plugins.
|
||||
**Problem**: `npx cap sync` overwrites `capacitor.plugins.json` and `capacitor.settings.gradle` with incorrect paths.
|
||||
|
||||
**Solution**: The fix script restores the DailyNotification plugin entry.
|
||||
**Solution**: The `cap:sync` script automatically:
|
||||
1. Runs `npx cap sync android`
|
||||
2. Fixes `capacitor.settings.gradle` (corrects plugin path from `android/` to `android/plugin/`)
|
||||
3. Restores the DailyNotification plugin entry in `capacitor.plugins.json`
|
||||
|
||||
**Without Step 3**: Plugin detection fails, "simplified dialog" appears.
|
||||
**Without the fix**: Plugin detection fails, build errors occur, "simplified dialog" appears.
|
||||
|
||||
## 🔍 Verification Checklist
|
||||
|
||||
@@ -52,10 +52,8 @@ echo "🔨 Building web assets..."
|
||||
npm run build
|
||||
|
||||
echo "🔄 Syncing with native projects..."
|
||||
npx cap sync android
|
||||
|
||||
echo "🔧 Fixing plugin registry..."
|
||||
node scripts/fix-capacitor-plugins.js
|
||||
npm run cap:sync
|
||||
# This automatically syncs and fixes plugin paths
|
||||
|
||||
echo "🏗️ Building Android app..."
|
||||
cd android
|
||||
@@ -72,7 +70,7 @@ echo "✅ Build and deploy complete!"
|
||||
|
||||
| Issue | Symptom | Solution |
|
||||
|-------|---------|----------|
|
||||
| Empty plugin registry | `capacitor.plugins.json` is `[]` | Run `node scripts/fix-capacitor-plugins.js` |
|
||||
| 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 |
|
||||
@@ -92,4 +90,4 @@ adb shell pm list packages | grep dailynotification
|
||||
|
||||
---
|
||||
|
||||
**Remember**: Always run the fix script after `npx cap sync`!
|
||||
**Remember**: Use `npm run cap:sync` instead of `npx cap sync android` directly - it automatically fixes the configuration files!
|
||||
|
||||
@@ -150,6 +150,8 @@ node scripts/fix-capacitor-plugins.js
|
||||
|
||||
**Solution**: Always run fix script after sync
|
||||
```bash
|
||||
npm run cap:sync
|
||||
# Or manually:
|
||||
npx cap sync android && node scripts/fix-capacitor-plugins.js
|
||||
```
|
||||
|
||||
@@ -159,9 +161,8 @@ npx cap sync android && node scripts/fix-capacitor-plugins.js
|
||||
|
||||
1. **Make Changes**: Edit Vue components, native code, or plugin logic
|
||||
2. **Build Web**: `npm run build`
|
||||
3. **Sync Native**: `npx cap sync android`
|
||||
4. **Fix Plugins**: `node scripts/fix-capacitor-plugins.js`
|
||||
5. **Build Android**: `cd android && ./gradlew :app:assembleDebug`
|
||||
3. **Sync Native**: `npm run cap:sync` (automatically fixes plugin paths)
|
||||
4. **Build Android**: `cd android && ./gradlew :app:assembleDebug`
|
||||
6. **Deploy**: `adb install -r app/build/outputs/apk/debug/app-debug.apk`
|
||||
7. **Test**: Launch app and verify plugin detection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user