【问题标题】:React Native Getting this error 'Operator "abs" not found'React Native 收到此错误“未找到运算符“abs””
【发布时间】:2021-01-29 03:23:05
【问题描述】:

我有一个我正在处理的项目,该项目是昨天建成的。今天,我收到此错误“未找到运算符“abs””,如下面的屏幕截图所示。我没有使用 expo 作为构建系统,尽管该项目确实使用 react-native-reanaminated 在我寻找解决方案以及在此答案中不断出现React Native Getting this error 'Unrecognized operator abs'

我尝试了那里的解决方案,但无济于事。任何指导将不胜感激。

❯ npx react-native info
info Fetching system and libraries information...
System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 359.10 MB / 8.00 GB
    Shell: 3.1.2 - /usr/local/bin/fish
  Binaries:
    Node: 14.4.0 - /var/folders/rt/7lc5vcw16459dszl8djk35fh0000gn/T/fnm-shell-146260/bin/node
    Yarn: 1.22.4 - ~/Github/project5/app/node_modules/.bin/yarn
    npm: 6.14.8 - /var/folders/rt/7lc5vcw16459dszl8djk35fh0000gn/T/fnm-shell-146260/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 11.7/11E801a - /usr/bin/xcodebuild
  Languages:
    Java: javac 15 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: ^3.0.4 => 3.2.1
    react: 16.13.1 => 16.13.1
    react-native: 0.63.3 => 0.63.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

❯ qnm react-native-gesture-handler
react-native-gesture-handler
└── 1.8.0

❯ qnm react-native-reanimated
react-native-reanimated
└── 1.13.1

【问题讨论】:

    标签: react-native build react-native-reanimated


    【解决方案1】:

    我可以通过运行以下命令来解决这个问题。 第一个命令清除 app/ios 目录中的 ios 构建。 第二个命令重置模拟器。您也可以通过单击Erase All Content and Settings. 从 GUI 执行此操作

    ❯ cd ios && xcodebuild clean
    ❯ killall "Simulator" 2> /dev/null; xcrun simctl erase all
    

    然后你像往常一样使用react-native start 重建你的应用程序并打开你的模拟器。

    【讨论】:

      猜你喜欢
      • 2020-11-28
      • 2022-08-21
      • 2022-08-04
      • 1970-01-01
      • 2023-02-13
      • 1970-01-01
      • 2020-01-24
      • 2015-06-29
      • 2017-06-19
      相关资源
      最近更新 更多