移动开发

capacitor-app-upgrade-v4-to-v5

cap-go/capgo-skills

Upgrades a Capacitor app from v4 to v5 using `npx cap migrate` from `@capacitor/cli@latest-5`, then the manual checklist - Node 16+, Xcode 14.1+, Android Studio Flamingo with JDK 17, AGP 8.0.0, Gradle 8.0.2, compile/target SDK 33, `package` moved from AndroidManifest.xml to `namespace` in build.gradle, Jetifier removal, pinning `androidScheme` to `http`, and official plugin breaking changes (Device `uuid` to `identifier`, Android 13 notification permissions, READ_MEDIA_IMAGES). Use when `@capacitor/core` is 4.x and the target is 5.x, or on errors like "Namespace not specified" or "Android Gradle plugin requires Java 17". Do not use for other major versions, plugin library upgrades, or non-Capacitor apps.

  • 646 次安装
  • 74 星标
  • 收录于

安装命令

npx skills add https://github.com/cap-go/capgo-skills --skill capacitor-app-upgrade-v4-to-v5

SKILL.md

Capacitor App Upgrade v4 to v5

Move a Capacitor 4 app to Capacitor 5. Source of truth: https://capacitorjs.com/docs/updating/5-0

When to Use

  • @capacitor/core in the snapshot below is 4.x and the user wants 5.x.
  • Android build fails after bumping to Capacitor 5 with Namespace not specified, a Java 11 vs 17 mismatch, or AGP 8 errors.
  • The user asks for the exact 4 -> 5 checklist for iOS, Android, or official plugins.

Do not use:

  • App on 5.x or later -> capacitor-app-upgrade-v5-to-v6 (then v6-to-v7, v7-to-v8). Multi-hop planning -> capacitor-app-upgrades.
  • Upgrading a plugin library -> capacitor-plugin-upgrade-v4-to-v5.
  • App on 3.x -> upgrade to 4 first (npx cap migrate in 5.x refuses projects below 4).

Live Project Snapshot

Capacitor App Upgrade v4 to v5

Move a Capacitor 4 app to Capacitor 5. Source of truth: https://capacitorjs.com/docs/updating/5-0

When to Use

  • @capacitor/core in the snapshot below is 4.x and the user wants 5.x.
  • Android build fails after bumping to Capacitor 5 with Namespace not specified, a Java 11 vs 17 mismatch, or AGP 8 errors.
  • The user asks for the exact 4 -> 5 checklist for iOS, Android, or official plugins.

Do not use:

  • App on 5.x or later -> capacitor-app-upgrade-v5-to-v6 (then v6-to-v7, v7-to-v8). Multi-hop planning -> capacitor-app-upgrades.
  • Upgrading a plugin library -> capacitor-plugin-upgrade-v4-to-v5.
  • App on 3.x -> upgrade to 4 first (npx cap migrate in 5.x refuses projects below 4).

Live Project Snapshot