Skip to content

chore(example): use androidx.collection 1.4.4 on Android [skip ci] - #1233

Merged
DylanVann merged 1 commit into
mainfrom
chore/example-androidx-collection
Oct 3, 2026
Merged

DylanVann merged 1 commit into
mainfrom
chore/example-androidx-collection

Conversation

@DylanVann

Copy link
Copy Markdown
Owner

Since React Native 0.87, Fabric's view registry on Android (SurfaceMountingManager) is an androidx.collection MutableIntObjectMap. androidx.collection 1.4.0 to 1.4.2 can lose entries of these maps after many removals (issuetracker 352560465, fixed in 1.4.3), and the main example app resolves 1.4.2 through appcompat. Fabric then drops events and mount instructions for views whose entry is gone. In the regression runner this shows as Unable to find viewState soft exceptions, an occasional case stuck on waiting because its onLoad never reached JS (logged: the view was mounted and showing its image, but resolveView returned null for its tag), and once a crash in addViewAt.

The example app now depends on androidx.collection 1.4.4, with a comment saying why. React Native 0.88 depends on 1.4.4 itself (react/react-native#58389), so the dependency can be removed after updating React Native. The library doesn't change.

Testing

  • ./gradlew :app:dependencyInsight --dependency androidx.collection:collection: 1.4.2 before, 1.4.4 after.
  • node scripts/verify.mts --android --app main, 6 runs each, counting Unable to find viewState in logcat: 0 in every run with this change; 29, 33, 5, 25, 3 and 2 without it.

androidx.collection 1.4.0 to 1.4.2 loses entries of React Native 0.87's
view registry (a MutableIntObjectMap), and the example app resolves 1.4.2
through appcompat. Fabric then drops events and mount instructions for
those views. React Native 0.88 depends on 1.4.4 (react/react-native#58389);
the dependency can be removed after updating to it.
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 8.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@DylanVann
DylanVann deleted the chore/example-androidx-collection branch October 4, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant