React Native - 重新激活集成错误

问题描述 投票:0回答:1

我在我的项目中安装了 React Native Reanimated。安装后,项目运行时显示错误:

C/C++: ninja: Entering directory `D:\React Native\ReactNative-Crafter\node_modules\react-native-reanimated\android\.cxx\Debug\152s51q4\arm64-v8a'

C++ build system [build] failed while executing:
  @echo off
  "C:\\Users\\haide\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^
    -C ^
    "D:\\React Native\\ReactNative-Crafter\\node_modules\\react-native-reanimated\\android\\.cxx\\Debug\\152s51q4\\arm64-v8a" ^
    reanimated ^
    worklets
from D:\React Native\ReactNative-Crafter\node_modules\react-native-reanimated\android

复活版本:

"react-native-reanimated": "^3.16.1",

我还在 Bable.config.js 中添加了这个:

module.exports = {presets: ['module:@react-native/babel-preset'],plugins: ['react-native-reanimated/plugin'],};

enter image description here

如果有人知道如何解决此问题,请帮助我。

android react-native react-native-reanimated react-native-reanimated-v2
1个回答
0
投票

这些错误是由文件夹名称中的空格引起的,例如

React Native

将名称更改为

ReactNative
后问题解决。

© www.soinside.com 2019 - 2024. All rights reserved.