Skip to content

fix(android): remove stale generated resources - #2996

Open
Tommy Nguyen (tido64) wants to merge 1 commit into
trunkfrom
tido/android/fix-sync-res
Open

Tommy Nguyen (tido64) wants to merge 1 commit into
trunkfrom
tido/android/fix-sync-res

Conversation

@tido64

@tido64 Tommy Nguyen (tido64) commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Description

copyResources and friends used Copy tasks, which never delete files that were removed from the sources. Replacing a drawable with one of the same name but a different extension left both in the generated folder, and mergeDebugResources failed with "duplicate resources".

Use Sync instead, with a single task owning each generated directory (fonts are now synced into assets/fonts by copyAssets, and media into res/raw by copyResources).

Resolves #2993.

Platforms affected

  • Android
  • iOS
  • macOS
  • visionOS
  • Windows

Test plan

n/a

@github-actions github-actions Bot added the platform: Android This affects Android label Oct 29, 2026
`copyResources` and friends used `Copy` tasks, which never delete files
that were removed from the sources. Replacing a drawable with one of the
same name but a different extension left both in the generated folder,
and `mergeDebugResources` failed with "duplicate resources".

Use `Sync` instead, with a single task owning each generated directory
(fonts are now synced into `assets/fonts` by `copyAssets`, and media
into `res/raw` by `copyResources`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: Android This affects Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

copyResources keeps a resource its source no longer has, and the build fails with Duplicate resources

1 participant