Files
Peter Abbondanzo d7ff82ebe4 Fix Activity Result launcher compilation (#58688)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58688

Different AndroidX artifacts expose `ActivityResultLauncher.contract` as either a Kotlin property or a Java `getContract()` method. A Kotlin subclass cannot override both source representations even though they have the same JVM signature.

Route the contract accessor through a package-private Java superclass so both representations resolve to the same JVM method. Use the bridge in production and test launchers, verify that the registered contract is preserved, and allowlist this required Java compatibility source.

Changelog:
[Android][Fixed] - Fix Activity Result launcher compilation across AndroidX source variants

Reviewed By: fkgozali

Differential Revision: D121845437

fbshipit-source-id: 3d4e2c5726a8b39e5bb3863211fb7c88dd16e43a
2026-09-25 17:03:09 -07:00
..