From 0e5994317c49fbb1a629a686fa0d80f30a2d8065 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Sun, 12 Oct 2025 06:20:18 +0000 Subject: [PATCH] docs: add troubleshooting for common build failures - Document that npx cap sync fails in plugin development projects (expected behavior) - Add troubleshooting for incorrect Gradle project names - List available Gradle projects and recommend :plugin for builds - Clarify that www/ directory missing is normal for plugin projects This addresses the specific failures seen in the terminal output and provides clear guidance for future users. --- BUILDING.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/BUILDING.md b/BUILDING.md index 20c4082..e65180b 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -505,6 +505,14 @@ rm -rf ~/.gradle/caches/ # Solution: Build the plugin module instead of the test app ./gradlew :plugin:assembleRelease +# Problem: Build fails with "Cannot locate tasks that match ':android:assembleRelease'" +# Solution: Use correct project name - available projects are: +# - :app (test app, may have Capacitor issues) +# - :plugin (plugin library, recommended) +# - :capacitor-android +# - :capacitor-cordova-android-plugins +./gradlew :plugin:assembleRelease + # Problem: Build fails with "Plugin with id 'kotlin-android' not found" # Solution: The plugin module doesn't need Kotlin plugin for Java/Kotlin code # Check the plugin/build.gradle file @@ -518,6 +526,11 @@ rm -rf ~/.gradle/caches/ # - npx cap update # - npx cap add android +# ⚠️ NOTE: npx cap sync will fail in plugin development projects! +# This is expected - plugin projects don't have www/ directory +# Error: "Could not find the web assets directory: ./www" +# This is normal for plugin development projects + # To fix after Capacitor operations: ./scripts/fix-capacitor-build.sh