Replies: 1 comment
-
Pretty sure this is an issue with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently in the process of making some remaining internal packages compatible with the New Architecture through the Interop Layer. Unfortunately, I keep running into an issue with
DeviceEventManagerModule
on Kotlin projects. Whenever this is used and we enable the New Architecture for the Android app, the build fails with this error:Source code and gradle setup
This is a minified excerpt from one of the affected Kotlin modules:This is the module's build.gradle:
And its gradle.properties:
This is the app's build.gradle:
It works fine when disabling the New Architecture and building without it.
I'm unable to find any related issue to this or any material saying that we need to migrate
DeviceEventManagerModule
to something else for it to work through the Interop Layer. In fact, the React Native documentation on Native Modules still recommends using this: https://reactnative.dev/docs/legacy/native-modules-android?android-language=kotlin#sending-events-to-javascriptWhile I'm aware that the documentation on Native Modules isn't fully updated for the New Architecture yet, this does make me wonder that I seem to be the only person encountering this issue – leading me to believe that it's some problem in my build set-up?
Can someone help with this?
Update 1: This seems to be limited to React Native 0.76. After downgrading everything back to 0.75 (according to the RN Update Helper), the build and the module itself work fine, even with New Architecture enabled. Therefore not sure if this is fitting as a discussion here in the WG, or if it's more fitting as a bug report in React Native itself.
Beta Was this translation helpful? Give feedback.
All reactions