You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 09abb1e
Browse filesBrowse the repository at this point in the historyBrowse files
Package HEIC and HEIF image assets as Android raw resources
The bundle command copies a HEIC or HEIF asset into a `drawable-*`
resource folder. The Android Gradle plugin accepts only XML, PNG, GIF,
JPEG, BMP, WebP and AVIF files there, and fails the build on any other
file with "The file name must end with .xml or .png", so a release
build of an app that requires a HEIC image fails.
Remove both types from `drawableFileTypes` so the assets go to `raw`,
where any file is accepted. So that the image still resolves,
`ResourceDrawableIdHelper.getResourceDrawableUri`, which turns an image
source's resource name into a `res:` URI for Fresco, looks the name up
among the raw resources when no drawable has it. A drawable keeps
precedence over a raw resource with the same name.
`getResourceDrawableId` and `getResourceDrawable` still resolve
drawables only: their callers load the id as a drawable, which a raw
resource is not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelper.kt
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/imagehelper/ResourceDrawableIdHelperTest.kt
0 commit comments