Kotlin Compilation Fails ā Unresolved Supertype ViewManagerWithGeneratedInterface and Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of ...
Description
React Native: 0.76.5 React: 18.3.1 react-native-reanimated: 3.16.7 react-native-screens: 4.6.0 Gradle: 8.10.2 Kotlin: 2.0.21. e: RNGestureHandlerButtonViewManager.kt: Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'RNGestureHandlerButtonViewManager'. Check your module classpath for missing or conflicting dependencies.
Steps to reproduce
Try to build the Android project using npm run android. Compilation fails with Kotlin errors.
A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.
https://1drv.ms/i/c/ba34a1b67a6d11bb/EWDlcVaAayxHhxD15VpNqm0BLOv-T82jaRwpHbpm42oIXA?e=PeQdhB
Gesture Handler version
2.23.1
React Native version
0.76.5
Platforms
MacOS
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
None
Build type
Debug mode
Device
Android emulator
Device model
No response
Acknowledgements
Yes
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?
Hi @vinaykumarIndia! Based on description I assume that your target platform is android. Beside that, is something wrong with macOS? (I'm asking since you've chose this platform).
Anyway, both, RN 0.76 and Gesture Handler 2.23.1 are quite old, does this also happen in newer versions?
same here, only for android, suddenly the android build stopped working RN: 0.76.6 GestureHandler: 2.26.0
if I use GestureHandler: 2.25.0 it's working
@larkonesvk each Gesture Handler version is guaranteed to support 3 latest minor releases of RN, so for 2.26 last supported version is RN 0.78. For older versions it might work, but we do not test that far behind.
same here RN: 0.75.4 GestureHandler: 2.25.0 not working
@camboYY 2.25.0 is meant to be used with at least 0.76.
@vinaykumarIndia have you been able to try updated versions?
@m-bert Can you pls have a look at this too same issue working in debug mode , but failing during release build job React native 0.74.7 -old architecture React native guesture handler tried versions from 2.20 to latest same issue with all platform Android(no issues with ios build)
Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class com.facebook.react.viewmanagers.RNGestureHandlerButtonManagerInterface, unresolved supertypes: ViewManagerWithGeneratedInterface
class com.facebook.react.viewmanagers.RNGestureHandlerRootViewManagerInterface, unresolved supertypes: ViewManagerWithGeneratedInterface
@m-bert Can you pls have a look at this too same issue working in debug mode , but failing during release build job
I've just created RN app on 0.74.7 with Gesture Handler 2.23.1 - last version supporting 0.74. It works as expected on both debug and release.
I am currently on a MacOs with React-native version 0.76.8 and just tried building for android with version 2.25.0 and I also am getting the same build error:
node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt:25:79 Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'com.swmansion.gesturehandler.react.RNGestureHandlerRootViewManager'. Check your module classpath for missing or conflicting dependencies FAILURE: Build failed.
I am trying to just test out different versions to see what clicks but I started with a older version of gesture handler and worked my way up to here. I will comment here if i find a way through it.
Hi @CascadiaTech!
I am currently on a MacOs with React-native version 0.76.8 and just tried building for android with version 2.25.0 and I also am getting the same build error:
Can you show me your package.json?
Since we cannot reproduce this on our end, we have to take some action. I'm closing this issue as there is no reproduction that we can look at.
If this issue still persists, you can open new one. In that case:
- Remember to attach minimal, reproducible example.
- Use one of the following Gesture Handler versions:
- 2.26.0 (with
react-native>=0.78.0) - 2.25.0 (with
react-nativebetween0.79.xand0.76.0)
- 2.26.0 (with
[!CAUTION] Issues without working reproduction, as well as using older Gesture Handler versions (<
2.25.0), will be closed!
Cannot access 'ViewManagerWithGeneratedInterface' in RNGestureHandlerRootViewManager with RN 0.74.5 and react-native-gesture-handler 2.23.1
Iām encountering the following error when building my React Native app:
Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'com.swmansion.gesturehandler.react.RNGestureHandlerRootViewManager'. Check your module classpath for missing or conflicting dependencies
React Native version: 0.74.5 Android gradle plugin: 8.6.0 Gradle: 8.7 react-native-gesture-handler version: 2.23.1
It seems like there may be an incompatibility between the latest react-native-gesture-handler and the ViewManagerWithGeneratedInterface used by React Native 0.74.x. Could you please help confirm if react-native-gesture-handler 2.23.1 is fully compatible with RN 0.74.5, or provide guidance on supported versions?
my react-native version is 0.75.1. Although I tried to fix the issue multiple times (using several versions), I'm still getting this error:
I'm having the same problem. Using react-native 0.77.2. I had to install this to use React Native Reanimated Carousel, and while it works flawlessly in iOS it crashes while building in Android
We've decided to lock conversation on this issue since no valuable information were provided.
As per my last comment, if this issue still persists, you can open new one. In that case:
- Remember to attach minimal, reproducible example.
- Use one of the following Gesture Handler versions:
- 2.26.0 (with
react-native>=0.78.0) - 2.25.0 (with
react-nativebetween0.79.xand0.76.0)
- 2.26.0 (with
[!CAUTION] Issues without working reproduction, as well as using older Gesture Handler versions (<
2.25.0) or React Native (<0.76.0), will be closed!