Skip to content

Fix TextLayoutManager compilation against compile SDK 34 (#56118)#56118

Closed
azverkan wants to merge 1 commit intofacebook:mainfrom
azverkan:export-D95994030
Closed

Fix TextLayoutManager compilation against compile SDK 34 (#56118)#56118
azverkan wants to merge 1 commit intofacebook:mainfrom
azverkan:export-D95994030

Conversation

@azverkan
Copy link
Copy Markdown
Contributor

@azverkan azverkan commented Mar 16, 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

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 16, 2026

@azverkan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95994030.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 16, 2026
Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot changed the title Fix TextLayoutManager compilation against compile SDK 34 Fix TextLayoutManager compilation against compile SDK 34 (#56118) Mar 18, 2026
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
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
@azverkan azverkan force-pushed the export-D95994030 branch 2 times, most recently from 560f05e to 52fd654 Compare March 23, 2026 18:33
azverkan added a commit to azverkan/react-native that referenced this pull request Mar 23, 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 23, 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
@azverkan azverkan force-pushed the export-D95994030 branch 2 times, most recently from c045d3f to 03002cc Compare March 25, 2026 00:23
azverkan added a commit to azverkan/react-native that referenced this pull request Mar 25, 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 25, 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
azverkan added a commit to azverkan/react-native that referenced this pull request Mar 26, 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
)

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
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @azverkan in c118fa0

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 26, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 26, 2026

This pull request has been merged in c118fa0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants