Class 'ModalContentLayout' is not abstract and does not implement abstract member 'onChildStartedNativeGesture'.
What happened?
When trying to build my android app for rn version 0.78.2 and 0.79 I get this error:
node_modules/react-native-navigation/lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt:12:1 Class 'ModalContentLayout' is not abstract and does not implement abstract member 'onChildStartedNativeGesture'.
What was the expected behaviour?
App to build properly
Was it tested on latest react-native-navigation?
- [x] I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!
Minimal reproducible repo: https://github.com/tomruijgrok/rnn-android-bug
In what environment did this happen?
React Native Navigation version: 7.44.0 and 7.45.0 (possible more) React Native version: 0.78.2 and 0.79.0 (possible more) Has Fabric (React Native's new rendering system) enabled: (yes/no) Node version: 23.11 Device model: Android version:
Likely related to this bug: #7612 . But this issue is old and no real solution for it (I think). I didn't have the issue with react native 0.74
I encountered this bug when i upgraded react native version 0.76.7 to 0.79.1. Also I am using this version "react-native-navigation": "^8.1.0-alpha01". I have tried old suggestions and didn't work the suggestions.
- react-native-navigation = "^8.1.0-alpha01"
- react-native = "0.79.1"
- Android Studio Ladybug Feature Drop | 2024.2.2 Patch 1
same issue here @gosha212
I changed code, you can find bottom. But after the changing i encountered another bug. Generated code give a parameter to NavigationPackage. new NavigationPackage(reactNativeHost) but NavigationPackage didn't accept any parameter class NavigationPackage() : ReactPackage {
class ModalContentLayout(context: Context?) : ReactViewGroup(context), RootView{
private val mJSTouchDispatcher = JSTouchDispatcher(this)
override fun onChildStartedNativeGesture(child: View?, androidEvent: MotionEvent) {
mJSTouchDispatcher.onChildStartedNativeGesture(androidEvent, this.getEventDispatcher())
}
override fun onChildStartedNativeGesture(androidEvent: MotionEvent) {
mJSTouchDispatcher.onChildStartedNativeGesture(androidEvent, this.getEventDispatcher())
}
override fun onChildEndedNativeGesture(child: View, androidEvent: MotionEvent) {
mJSTouchDispatcher.onChildEndedNativeGesture(androidEvent, this.getEventDispatcher())
}
override fun requestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {}
private fun getEventDispatcher(): EventDispatcher {
val reactContext: ReactContext = this.getReactContext()
return UIManagerHelper.getEventDispatcher(reactContext, UIManagerType.FABRIC) ?: throw IllegalStateException("EventDispatcher for Fabric UI Manager is not found")
}
override fun handleException(t: Throwable) {
getReactContext().handleException(RuntimeException(t))
}
private fun getReactContext(): ReactContext {
return this.context as ReactContext
}
override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
mJSTouchDispatcher.handleTouchEvent(event, getEventDispatcher())
return super.onInterceptTouchEvent(event)
}
override fun onTouchEvent(event: MotionEvent): Boolean {
mJSTouchDispatcher.handleTouchEvent(event, getEventDispatcher())
super.onTouchEvent(event)
return true
}
}
Hi @tomruijgrok @hasanalicansu. rn 78 and 79 are not supported yet. We are still working on stabilizing RN 77:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Hi @gosha212 any update on this issue?
We're working on rn78 and 79 support
At the moment the oldest supported version of react-native is 0.79 and it is at the end of the cycle.
https://github.com/reactwg/react-native-releases/blob/main/docs/support.md
Many libraries require the use of react-native newer version (at least 0.79). And starting from 1st November there is a Google play requirement about 16KB page size support that force many projects to adopt newer version of many libraries. So is essential that react-native-navigation could be compatible with react-native version 0.79.
@gosha212 > We're working on rn78 and 79 support
There is any update about a possible release date?
Thank you very much for your support
@simonecorsato You can opt in for 16k in react native 77 https://reactnative.dev/blog/2025/01/21/version-0.77#android-version-15-support--16kb-page-support
Thank you very much for you reply. I know, but unfortunately I have also a dependency on Expo. Right now we are using Expo sdk 52 but seems that only Expo sdk 53 is supporting 16kb. But when we try to migrate to Expo sdk 53, it requires react-native 0.79, and so we are stuck. Right now we managed to upgrade everything to react-native 0.79 and only react-native-navigation is missing, that's why I was asking. We will need to find a solution until react-native-navigation will support react-native 0.79.
Thank you very much for you reply.非常感谢您的回复。 I know, but unfortunately I have also a dependency on Expo. Right now we are using Expo sdk 52 but seems that only Expo sdk 53 is supporting 16kb. But when we try to migrate to Expo sdk 53, it requires react-native 0.79, and so we are stuck.我知道,但不幸的是,我也依赖世博会。现在我们正在使用 Expo sdk 52,但似乎只有 Expo sdk 53 支持 16kb。但是当我们尝试迁移到 Expo sdk 53 时,它需要 react-native 0.79,所以我们被卡住了。 Right now we managed to upgrade everything to react-native 0.79 and only react-native-navigation is missing, that's why I was asking.现在我们设法将所有内容升级到 react-native 0.79,但只有 react-native-navigation 缺失,这就是我问的原因。 We will need to find a solution until react-native-navigation will support react-native 0.79.我们需要找到一个解决方案,直到 react-native-navigation 将支持 react-native 0.79。
about Android 16kb. I think we need RN 0.77.3, Expo 52, and RNN 8.3.2. It was successfully run in iOS, but I can't run it successfully in Android.