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.
This commit is contained in:
13
BUILDING.md
13
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user