From d6a5f159c6ef81651d38af2a33338b921700e044 Mon Sep 17 00:00:00 2001 From: Oskar Pawica Date: Tue, 8 Sep 2026 04:26:36 -0700 Subject: [PATCH] fix(android): bump androidx.collection to 1.4.4 to avoid MutableIntObjectMap corruption in SurfaceMountingManager (#58389) Summary: since https://github.com/react/react-native/issues/56646 the view registry is a `MutableIntObjectMap`; `androidx.collection` 1.4.0 to 1.4.2 corrupt `ScatterMap` and its primitive variants after remove-heavy sequences, fixed in 1.4.3 (https://issuetracker.google.com/issues/352560465). Apps resolve 1.4.0 or 1.4.2 and lose registry entries; RN then drops mount instructions and can leave stale views. Fixes https://github.com/react/react-native/issues/58388. ## Changelog: `[ANDROID] [FIXED] - Bump androidx.collection to 1.4.4 to fix view registry entries getting lost in SurfaceMountingManager` Pull Request resolved: https://github.com/react/react-native/pull/58389 Test Plan: Reproducer: https://github.com/pawicao/rn-android-view-registry-corruption - RN 0.87.1 app resolving androidx.collection 1.4.2: 91 `Unable to find viewState` soft exceptions on 45 tags over two 40-round runs on a Pixel 9a, and a stale view left on screen. - Same screen with androidx.collection pinned to 1.4.4: none over 120 rounds. Reviewed By: cortinico Differential Revision: D119149754 Pulled By: javache fbshipit-source-id: afb13330bac575218a07a030bb1bcd5bf7e00824 --- packages/react-native/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/gradle/libs.versions.toml b/packages/react-native/gradle/libs.versions.toml index d12ebc7b91e..0bba9087d8d 100644 --- a/packages/react-native/gradle/libs.versions.toml +++ b/packages/react-native/gradle/libs.versions.toml @@ -10,7 +10,7 @@ agp = "9.2.1" androidx-annotation = "1.6.0" androidx-appcompat = "1.7.0" androidx-autofill = "1.3.0" -androidx-collection = "1.4.0" +androidx-collection = "1.4.4" androidx-benchmark-macro-junit4 = "1.3.3" androidx-profileinstaller = "1.4.1" androidx-swiperefreshlayout = "1.1.0"