2

这个问题已经被问过了,但那里没有回应。我再次问,因为我希望最近有人可能会遇到这个问题。

我已经安装了react-native-reanimated 2,一旦我运行应用程序就会出现以下错误

不变违规:TurboModuleRegistry.getEnforcing(...): 'NativeReanimated' 找不到。验证该名称的模块是否已在本机二进制中注册。,js引擎:hermes

有人可以帮我摆脱这个错误吗?

4

1 回答 1

0
Error Solved 

**Error - TurboModuleRegistry.getEnforcing(...): 'NativeReanimated'**
Hello,
I got this[TurboModuleRegistry.getEnforcing(...): 'NativeReanimated'] error and i found the solution 
Step 1 - Download react native project from github  "https://github.com/software-mansion-labs/reanimated-2-playground".
Step 2- Then run command 
=> npm install
=> react-native start
=> react-native run-android
and build app 
Step 3- when its work move your required project files and install your required npm pakages.
Step 4 - Then run commands
=> npm cache clean --force
=> cd android
=> gradlew clean
=> gradle cleanBuildCache
=> gradlew build --refresh-dependencies
=> cd..
=> npx react-native start --reset-cache
=> npx react-native run-android
its work for me try once.
于 2021-03-18T07:02:52.760 回答