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

huangapple go评论60阅读模式
英文:

reanimated version problem (couldn't determine the version of the native part of Reanimated.)

问题

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

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

但我的应用程序触摸功能不起作用。

我收到了以下错误信息:

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

我该如何解决这个问题?

首先,我升级了 Expo SDK。

但我仍然收到相同的错误。

其次,重新构建应用程序。

但我仍然收到相同的错误。

第三,我重新安装了 reanimated,但错误仍然存在。

英文:

I am trying to practive this video.

https://youtu.be/R7vyLItMQJw
(The basics of PinchGestureHandler with React Native Reanimated 2)

but my app doesn't work touch.

I get this Error

[Reanimated] Couldn't determine the version of the native part of Reanimated.Did you forget to re-build the app after upgrading react-native-reanimated? If you use Expo Go, you must use the exact version which is bundled into Expo SDK.

How can I solve this problem?

first. I upgraded Expo SDK.

but I got still same error.

second. re-build the app.

but I got still same error.

third. I install reanimated again. but still be same error.

答案1

得分: 3

由于您安装的Reanimated版本与您的expo包版本不兼容,因此出现此问题。请在终端中运行以下命令:

expo doctor --fix-dependencies

然后运行以下命令:

expo start

或者

npm start

这是您通常用来启动开发服务器的命令。

英文:

That is because the Reanimated version you installed is not compatible with your expo package version. try running this in terminal:

expo doctor --fix-dependencies

then run

expo start

or

npm start

whatever command you usually enter to open your development server

答案2

得分: 0

我现在也遇到了完全相同的问题。
以下内容解决了我的问题:

npx expo start --clear

希望对你也有用。

英文:

I was having the very same problem right now.
The following solved my issue:

npx expo start --clear

Hope it works for you too.

huangapple
  • 本文由 发表于 2023年2月10日 11:25:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75406640.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定