You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: Kotlin 2.3 compile error in RNGestureHandlerModule (rootViewTag vs getRootViewTag) #4042
When compiling the Android library with Kotlin 2.3.x (e.g. as required by other dependencies such as Stripe Android SDK), RNGestureHandlerModule.kt fails to compile in findRootHelperForViewAncestor:
Function invocation 'getRootViewTag()' expected
at the expression using it.rootView.rootViewTag next to a local variable also named rootViewTag.
Environment
react-native-gesture-handler2.30.1 (also reproducible on current 2.30.x line)
Kotlin 2.3.0+ (project/toolchain aligned with RN 0.83 + libraries compiled with Kotlin 2.3 metadata)
Inside findRootHelperForViewAncestor, the local val rootViewTag = ... shadows the synthetic Kotlin property rootViewTag on ReactRootView. The compiler then fails to resolve the property access on the left-hand side of the comparison (Kotlin 2.3 is stricter here than 2.1.x).
ReactRootView exposes the tag via getRootViewTag() in Java; the fix is to use an explicit receiver and call getRootViewTag() (or rename the local variable).
Consumers can apply the one-line change locally (e.g. patch-package) until an upstream release includes the fix.
Related downstream context: projects that bump Kotlin to 2.3 for Stripe or other SDKs hit this as a hard compile failure on :react-native-gesture-handler:compileDebugKotlin.
It looks like you've omitted a few important sections from the issue template.
Please complete Description, Steps to reproduce, A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug., Gesture Handler version, React Native version and Platforms sections.
Activity
github-actions commentedon Mar 27, 2026
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Description, Steps to reproduce, A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug., Gesture Handler version, React Native version and Platforms sections.
github-actions commentedon Mar 27, 2026
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
christian-apollo commentedon Mar 27, 2026
Opened PR with the fix: #4043 (target branch
2.30-stable).fix(android): compile RNGestureHandlerModule with Kotlin 2.3 (#4043)
m-bert commentedon Apr 2, 2026
Released in 2.31.0 🎉