Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNGH 2.16.0+ only supports React Native >=0.68.0 (Android) #2845

Closed
dylmye opened this issue Apr 2, 2024 · 1 comment · Fixed by #2849
Closed

RNGH 2.16.0+ only supports React Native >=0.68.0 (Android) #2845

dylmye opened this issue Apr 2, 2024 · 1 comment · Fixed by #2849
Labels
Missing repro Platform: Android This issue is specific to Android

Comments

@dylmye
Copy link

dylmye commented Apr 2, 2024

Description

Changes in #2597 mean that RNGestureHandler's minimum RN version for 2.16.0 is 0.68.0. This is because the signature for onChildStartedNativeGesture changed in 0.68.0 (see 0.67.5, 0.68.0) and this PR changes the usage to the new signature. In particular, see line 81 for the change for RNGestureHandlerRootHelper.kt.

Please update the docs to reflect this compatibility change. It's not my fault we are stuck on an old RN version :-)

Steps to reproduce

  1. Attempt to install RNGH 2.16.0 on React Native template at version 0.67.5

Expected: it works as it's > 0.67.0
Actual:

e: [...]/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt: (81, 46): Type mismatch: inferred type is {RootView & ViewGroup} but MotionEvent! was expected
e: [...]/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt: (81, 56): Too many arguments for public abstract fun onChildStartedNativeGesture(androidEvent: MotionEvent!): Unit defined in com.facebook.react.uimanager.RootView

Snack or a link to a repository

n/a

Gesture Handler version

2.16.0

React Native version

0.67.5

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Missing repro labels Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

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?

m-bert added a commit that referenced this issue Apr 4, 2024
## Description

Changes introduced in #2597, which were released in 2.16.0, made GestureHandler not compatible with React Native versions below 0.68. This PR updates our compatibility tables in documentation and `README`.

Closes #2845 

## Test plan

Run docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro Platform: Android This issue is specific to Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant