reanimated 版本问题(无法确定 Reanimated 原生部分的版本。)

hee*_*won 6 pinchzoom react-native expo react-native-reanimated react-native-reanimated-v2

我正在尝试练习这个视频。

https://youtu.be/R7vyLItMQJw(PinchGestureHandler 与 React Native Reanimated 2 的基础知识)

但我的应用程序无法触摸。

我收到此错误

[Reanimated] 无法确定Reanimated原生部分的版本。您是否在升级react-native-reanimated后忘记重新构建应用程序?如果您使用 Expo Go,则必须使用捆绑到 Expo SDK 中的确切版本。

我怎么解决这个问题?

第一的。我升级了Expo SDK。

但我仍然遇到同样的错误。

第二。重新构建应用程序。

但我仍然遇到同样的错误。

第三。我再次安装reanimated。但仍然是同样的错误。

小智 0

我现在也遇到了同样的问题。以下解决了我的问题:

npx expo start --clear
Run Code Online (Sandbox Code Playgroud)

希望它也适合你。