Fix TextLayoutManager compilation against compile SDK 34 (#56118)#56118
Open
azverkan wants to merge 1 commit intofacebook:mainfrom
Open
Fix TextLayoutManager compilation against compile SDK 34 (#56118)#56118azverkan wants to merge 1 commit intofacebook:mainfrom
azverkan wants to merge 1 commit intofacebook:mainfrom
Conversation
cortinico
approved these changes
Mar 16, 2026
Contributor
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
b46404f to
09ee23c
Compare
azverkan
added a commit
to azverkan/react-native
that referenced
this pull request
Mar 18, 2026
) Summary: TextLayoutManager.kt references Android 15 (API 35) symbols (`Build.VERSION_CODES.VANILLA_ICE_CREAM` and `StaticLayout.Builder.setUseBoundsForWidth`) that are unavailable when compiling against SDK level 34. This causes build failures for any Android target using `compile_sdk_version = 34`. Fix by defining `VERSION_CODE_VANILLA_ICE_CREAM = 35` in `AndroidVersion.kt` (following the existing `VERSION_CODE_BAKLAVA` pattern) and using reflection for `setUseBoundsForWidth`. Runtime behavior is unchanged — the version check guards ensure these code paths only execute on Android 15+ devices. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D95994030
azverkan
added a commit
to azverkan/react-native
that referenced
this pull request
Mar 18, 2026
) Summary: Pull Request resolved: facebook#56118 TextLayoutManager.kt references Android 15 (API 35) symbols (`Build.VERSION_CODES.VANILLA_ICE_CREAM` and `StaticLayout.Builder.setUseBoundsForWidth`) that are unavailable when compiling against SDK level 34. This causes build failures for any Android target using `compile_sdk_version = 34`. Fix by defining `VERSION_CODE_VANILLA_ICE_CREAM = 35` in `AndroidVersion.kt` (following the existing `VERSION_CODE_BAKLAVA` pattern) and using reflection for `setUseBoundsForWidth`. Runtime behavior is unchanged — the version check guards ensure these code paths only execute on Android 15+ devices. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D95994030
09ee23c to
c87acb8
Compare
) Summary: Pull Request resolved: facebook#56118 TextLayoutManager.kt references Android 15 (API 35) symbols (`Build.VERSION_CODES.VANILLA_ICE_CREAM` and `StaticLayout.Builder.setUseBoundsForWidth`) that are unavailable when compiling against SDK level 34. This causes build failures for any Android target using `compile_sdk_version = 34`. Fix by defining `VERSION_CODE_VANILLA_ICE_CREAM = 35` in `AndroidVersion.kt` (following the existing `VERSION_CODE_BAKLAVA` pattern) and using reflection for `setUseBoundsForWidth`. Runtime behavior is unchanged — the version check guards ensure these code paths only execute on Android 15+ devices. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D95994030
c87acb8 to
560f05e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
TextLayoutManager.kt references Android 15 (API 35) symbols
(
Build.VERSION_CODES.VANILLA_ICE_CREAMandStaticLayout.Builder.setUseBoundsForWidth) that are unavailable whencompiling against SDK level 34. This causes build failures for any
Android target using
compile_sdk_version = 34.Fix by defining
VERSION_CODE_VANILLA_ICE_CREAM = 35inAndroidVersion.kt(following the existingVERSION_CODE_BAKLAVApattern) and using reflection for
setUseBoundsForWidth. Runtimebehavior is unchanged — the version check guards ensure these code
paths only execute on Android 15+ devices.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D95994030