admin管理员组文章数量:1415491
Question:
(I don't use IOS) I am working on a React Native project and encountering the following error when trying to run the app on an Android emulator:
ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGestureHandlerModule' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes
Additionally, I get this error:
ERROR Invariant Violation: "EveryThink" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
Project Setup & Versions:
React Native Version:
0.74.0
react-native-gesture-handler Version:
2.24.0
react-navigation Version:
7.1.1
@react-navigation/drawer Version:
7.1.1
@react-navigation/native Version:
6.1.8
Android Emulator: API Level 33
Java Version:
17
Node.js Version:
18.x
NPM Version:
9.x
OS: Windows 10
Question:
How can I resolve this issue? Is there anything else I need to check or configure to make react-native-gesture-handler
work correctly?
Reinstalled react-native-gesture-handler
-
npm uninstall react-native-gesture-handler npm install react-native-gesture-handler
Cleared Metro Bundler cache and restarted the server
npx react-native start --reset-cache
Cleaned the Android build
cd android && ./gradlew clean && cd ..
Ensured
react-native-gesture-handler
is imported at the top ofindex.js
import 'react-native-gesture-handler';
Checked
MainActivity.java
for necessary importsimport com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
Rebuilt the project
npx react-native run-android
Despite these steps, I am still encountering the same issue.
本文标签:
版权声明:本文标题:navigation drawer - React Native: "TurboModuleRegistry.getEnforcing(...): 'RNGestureHandlerModule' coul 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745153101a2645006.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论