Quick answer: Godot 4 Android export failing with gradle cache errors after changing target API level? Cached intermediates aren't invalidated - delete android/build/.gradle and re-export.

Bumped target API from 33 to 34. Export fails: resource not found in cache.

Delete the cache

Remove android/build/.gradle. Re-export. Gradle rebuilds from scratch.

Or use gradlew clean

cd android/build && ./gradlew clean

Project-aware clean. Slightly slower than rm -rf; safer.

Pin SDK versions in CI

Build script writes the SDK versions to ensure consistency. Avoids per-machine drift.

“Build caches are aggressive. Target-level changes need cache invalidation.”

If Android exports fail mysteriously, the cache is the first thing to clear. Document; the workaround is one command.

Related reading