Repository navigation
[Android Experimental] [Android 15/16] multi-line text isn't displayed #56185
Description
Activity
Same problem, but we don't use
DefaultNewArchitectureEntryPoint.releaseLevel = ReleaseLevel.EXPERIMENTALSame problem, but we don't use
DefaultNewArchitectureEntryPoint.releaseLevel = ReleaseLevel.EXPERIMENTALWhich version of React Native are you using?
Same problem, but we don't use
DefaultNewArchitectureEntryPoint.releaseLevel = ReleaseLevel.EXPERIMENTALWhich version of React Native are you using?
We use react native 0.84.1
Which version of React Native are you using?
We use react native 0.84.1
@xrustics and you're getting this on Android 15 and 16 only? No issues on Android 14?
Which version of React Native are you using?
We use react native 0.84.1
@xrustics and you're getting this on Android 15 and 16 only? No issues on Android 14?
We hit the same issue on Android 15+ only (RN
0.84.1, New Architecture/Fabric): multiline text rendered only the first line (both in custom components and plainText), while iOS was fine.For us, the root cause was in
ReactAndroidTextLayoutManagerwidth calculation in the Android 15+ visual-bounds path.
This temporary workaround fixed it:1) Patch
TextLayoutManager.ktReplace:
val lineWidth = unconstrainedLayout.getLineRight(i) - unconstrainedLayout.getLineLeft(i) ... when (widthYogaMeasureMode) { YogaMeasureMode.AT_MOST -> min(ceil(desiredVisualWidth).toInt(), floor(width).toInt()) else -> ceil(desiredVisualWidth).toInt() }
With:
val lineWidth = unconstrainedLayout.getLineMax(i) ... when (widthYogaMeasureMode) { YogaMeasureMode.EXACTLY -> floor(width).toInt() YogaMeasureMode.AT_MOST -> min(ceil(desiredVisualWidth).toInt(), floor(width).toInt()) else -> ceil(desiredVisualWidth).toInt() }
2) Apply patch automatically after install
We added a
postinstallscript:"postinstall": "node scripts/apply-react-native-text-layout-patch.mjs"
3) Rebuild/publish patched
react-androidand include all ABIscd android ./gradlew :react-native:packages:react-native:ReactAndroid:publishReleasePublicationToMavenTempLocalRepository \ -PreactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_644) Point app build to local Maven with patched artifacts
In
android/gradle.properties:reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 react.internal.mavenLocalRepo=/tmp/maven-local
After this, multiline wrapping was restored globally for us (plain
Text) andassembleDebugpassed without ABI mismatch errors.Notes
/tmp/maven-localis temporary; if it is cleaned, republish artifacts.- This is a workaround until an upstream RN fix is available.
I hope this helps someone 🙏
- added a commit that references this issue
on Mar 30, 2026 - added a commit that references this issue
on Mar 31, 2026 Is the fix gonna be released into 0.85.1 ? I have the same issue the 2nd line is not rendered on Android, iOS is working fine
I just realized I got my app using the Experimental Release Level, so I would get back to the Stable track
EDIT:
Going back to the Stable track did the job!
Description
On Android 15 and Android 16, if you enable the Experimental mode, only the first line of a multi-line text is displayed.
Steps to reproduce
DefaultNewArchitectureEntryPoint.releaseLevel = ReleaseLevel.EXPERIMENTALReact Native Version
0.84.1
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://github.com/atlj/reproducer-rn-text-not-breaking
Screenshots and Videos