环境
"react-native": "0.68.2",
"react-native-reanimated": "^3.4.0",
> Task :react-native-reanimated:buildCMakeDebug FAILED
Execution failed for task ':react-native-reanimated:buildCMakeDebug'.
> Build command failed.
Error while executing process D:\AndroidSDK\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C D:\demo\team\node_modules\react-native-reanimated\android\.cxx\Debug\n1l4l3x5\x86 reanimated}
ninja: Entering directory `D:\demo\team\node_modules\react-native-reanimated\android\.cxx\Debug\n1l4l3x5\x86'
[1/6] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/JNIHelper.cpp.o
FAILED: CMakeFiles/reanimated.dir/src/main/cpp/JNIHelper.cpp.o
D:\AndroidSDK\ndk\25.0.8775105\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=i686-none-linux-android21 --sysroot=D:/AndroidSDK/ndk/25.0.8775105/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dreanimated_EXPORTS -I../../../../../Common/cpp/Tools -I../../../../../Common/cpp/SpecTools -I../../../../../Common/cpp/NativeModules -I../../../../../Common/cpp/SharedItems -I../../../../../Common/cpp/ReanimatedRuntime -I../../../../../Common/cpp/Registries -I../../../../../Common/cpp/LayoutAnimations -I../../../../../Common/cpp/AnimatedSensor -I../../../../../Common/cpp/Fabric -I../../../../../Common/cpp/hidden_headers -I../../../../src/main/cpp -I../../../../ -I../../../../build/third-party-ndk/boost/boost_1_63_0 -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog/exported -ID:/demo/team/node_modules/react-native/React -ID:/demo/team/node_modules/react-native/React/Base -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni -ID:/demo/team/node_modules/react-native/ReactCommon -ID:/demo/team/node_modules/react-native/ReactCommon/callinvoker -ID:/demo/team/node_modules/react-native/ReactCommon/jsi -ID:/demo/team/node_modules/react-native/ReactCommon/hermes -ID:/demo/team/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -ID:/demo/team/node_modules/react-native/ReactCommon/runtimeexecutor -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule/core -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule -ID:/demo/team/node_modules/react-native/ReactCommon/yoga -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DREACT_NATIVE_MINOR_VERSION=68 -DREANIMATED_VERSION=3.4.0 -DHERMES_ENABLE_DEBUGGER=0 -fexceptions -fno-omit-frame-pointer -frtti -fstack-protector-all -std=c++17 -Wall -Werror -DDEBUG -DJS_RUNTIME_JSC=1 -fno-limit-debug-info -fPIC -std=gnu++1z -MD -MT CMakeFiles/reanimated.dir/src/main/cpp/JNIHelper.cpp.o -MF CMakeFiles\reanimated.dir\src\main\cpp\JNIHelper.cpp.o.d -o CMakeFiles/reanimated.dir/src/main/cpp/JNIHelper.cpp.o -c ../../../../src/main/cpp/JNIHelper.cpp
In file included from ../../../../src/main/cpp/JNIHelper.cpp:1:
../../../../src/main/cpp/JNIHelper.h:3:10: fatal error: 'fbjni/fbjni.h' file not found
#include <fbjni/fbjni.h>
^~~~~~~~~~~~~~~
1 error generated.
[2/6] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/AndroidScheduler.cpp.o
FAILED: CMakeFiles/reanimated.dir/src/main/cpp/AndroidScheduler.cpp.o
D:\AndroidSDK\ndk\25.0.8775105\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=i686-none-linux-android21 --sysroot=D:/AndroidSDK/ndk/25.0.8775105/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dreanimated_EXPORTS -I../../../../../Common/cpp/Tools -I../../../../../Common/cpp/SpecTools -I../../../../../Common/cpp/NativeModules -I../../../../../Common/cpp/SharedItems -I../../../../../Common/cpp/ReanimatedRuntime -I../../../../../Common/cpp/Registries -I../../../../../Common/cpp/LayoutAnimations -I../../../../../Common/cpp/AnimatedSensor -I../../../../../Common/cpp/Fabric -I../../../../../Common/cpp/hidden_headers -I../../../../src/main/cpp -I../../../../ -I../../../../build/third-party-ndk/boost/boost_1_63_0 -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog/exported -ID:/demo/team/node_modules/react-native/React -ID:/demo/team/node_modules/react-native/React/Base -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni -ID:/demo/team/node_modules/react-native/ReactCommon -ID:/demo/team/node_modules/react-native/ReactCommon/callinvoker -ID:/demo/team/node_modules/react-native/ReactCommon/jsi -ID:/demo/team/node_modules/react-native/ReactCommon/hermes -ID:/demo/team/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -ID:/demo/team/node_modules/react-native/ReactCommon/runtimeexecutor -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule/core -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule -ID:/demo/team/node_modules/react-native/ReactCommon/yoga -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DREACT_NATIVE_MINOR_VERSION=68 -DREANIMATED_VERSION=3.4.0 -DHERMES_ENABLE_DEBUGGER=0 -fexceptions -fno-omit-frame-pointer -frtti -fstack-protector-all -std=c++17 -Wall -Werror -DDEBUG -DJS_RUNTIME_JSC=1 -fno-limit-debug-info -fPIC -std=gnu++1z -MD -MT CMakeFiles/reanimated.dir/src/main/cpp/AndroidScheduler.cpp.o -MF CMakeFiles\reanimated.dir\src\main\cpp\AndroidScheduler.cpp.o.d -o CMakeFiles/reanimated.dir/src/main/cpp/AndroidScheduler.cpp.o -c ../../../../src/main/cpp/AndroidScheduler.cpp
In file included from ../../../../src/main/cpp/AndroidScheduler.cpp:1:
../../../../src/main/cpp/AndroidScheduler.h:3:10: fatal error: 'fbjni/fbjni.h' file not found
#include <fbjni/fbjni.h>
^~~~~~~~~~~~~~~
1 error generated.
[3/6] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/LayoutAnimations.cpp.o
FAILED: CMakeFiles/reanimated.dir/src/main/cpp/LayoutAnimations.cpp.o
D:\AndroidSDK\ndk\25.0.8775105\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=i686-none-linux-android21 --sysroot=D:/AndroidSDK/ndk/25.0.8775105/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dreanimated_EXPORTS -I../../../../../Common/cpp/Tools -I../../../../../Common/cpp/SpecTools -I../../../../../Common/cpp/NativeModules -I../../../../../Common/cpp/SharedItems -I../../../../../Common/cpp/ReanimatedRuntime -I../../../../../Common/cpp/Registries -I../../../../../Common/cpp/LayoutAnimations -I../../../../../Common/cpp/AnimatedSensor -I../../../../../Common/cpp/Fabric -I../../../../../Common/cpp/hidden_headers -I../../../../src/main/cpp -I../../../../ -I../../../../build/third-party-ndk/boost/boost_1_63_0 -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog/exported -ID:/demo/team/node_modules/react-native/React -ID:/demo/team/node_modules/react-native/React/Base -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni -ID:/demo/team/node_modules/react-native/ReactCommon -ID:/demo/team/node_modules/react-native/ReactCommon/callinvoker -ID:/demo/team/node_modules/react-native/ReactCommon/jsi -ID:/demo/team/node_modules/react-native/ReactCommon/hermes -ID:/demo/team/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -ID:/demo/team/node_modules/react-native/ReactCommon/runtimeexecutor -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule/core -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule -ID:/demo/team/node_modules/react-native/ReactCommon/yoga -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DREACT_NATIVE_MINOR_VERSION=68 -DREANIMATED_VERSION=3.4.0 -DHERMES_ENABLE_DEBUGGER=0 -fexceptions -fno-omit-frame-pointer -frtti -fstack-protector-all -std=c++17 -Wall -Werror -DDEBUG -DJS_RUNTIME_JSC=1 -fno-limit-debug-info -fPIC -std=gnu++1z -MD -MT CMakeFiles/reanimated.dir/src/main/cpp/LayoutAnimations.cpp.o -MF CMakeFiles\reanimated.dir\src\main\cpp\LayoutAnimations.cpp.o.d -o CMakeFiles/reanimated.dir/src/main/cpp/LayoutAnimations.cpp.o -c ../../../../src/main/cpp/LayoutAnimations.cpp
In file included from ../../../../src/main/cpp/LayoutAnimations.cpp:1:
../../../../src/main/cpp/LayoutAnimations.h:3:10: fatal error: 'fbjni/fbjni.h' file not found
#include <fbjni/fbjni.h>
^~~~~~~~~~~~~~~
1 error generated.
[4/6] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/NativeProxy.cpp.o
FAILED: CMakeFiles/reanimated.dir/src/main/cpp/NativeProxy.cpp.o
D:\AndroidSDK\ndk\25.0.8775105\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=i686-none-linux-android21 --sysroot=D:/AndroidSDK/ndk/25.0.8775105/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dreanimated_EXPORTS -I../../../../../Common/cpp/Tools -I../../../../../Common/cpp/SpecTools -I../../../../../Common/cpp/NativeModules -I../../../../../Common/cpp/SharedItems -I../../../../../Common/cpp/ReanimatedRuntime -I../../../../../Common/cpp/Registries -I../../../../../Common/cpp/LayoutAnimations -I../../../../../Common/cpp/AnimatedSensor -I../../../../../Common/cpp/Fabric -I../../../../../Common/cpp/hidden_headers -I../../../../src/main/cpp -I../../../../ -I../../../../build/third-party-ndk/boost/boost_1_63_0 -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog/exported -ID:/demo/team/node_modules/react-native/React -ID:/demo/team/node_modules/react-native/React/Base -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni -ID:/demo/team/node_modules/react-native/ReactCommon -ID:/demo/team/node_modules/react-native/ReactCommon/callinvoker -ID:/demo/team/node_modules/react-native/ReactCommon/jsi -ID:/demo/team/node_modules/react-native/ReactCommon/hermes -ID:/demo/team/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -ID:/demo/team/node_modules/react-native/ReactCommon/runtimeexecutor -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule/core -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule -ID:/demo/team/node_modules/react-native/ReactCommon/yoga -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DREACT_NATIVE_MINOR_VERSION=68 -DREANIMATED_VERSION=3.4.0 -DHERMES_ENABLE_DEBUGGER=0 -fexceptions -fno-omit-frame-pointer -frtti -fstack-protector-all -std=c++17 -Wall -Werror -DDEBUG -DJS_RUNTIME_JSC=1 -fno-limit-debug-info -fPIC -std=gnu++1z -MD -MT CMakeFiles/reanimated.dir/src/main/cpp/NativeProxy.cpp.o -MF CMakeFiles\reanimated.dir\src\main\cpp\NativeProxy.cpp.o.d -o CMakeFiles/reanimated.dir/src/main/cpp/NativeProxy.cpp.o -c ../../../../src/main/cpp/NativeProxy.cpp
../../../../src/main/cpp/NativeProxy.cpp:2:10: fatal error: 'fbjni/fbjni.h' file not found
#include <fbjni/fbjni.h>
^~~~~~~~~~~~~~~
1 error generated.
[5/6] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/OnLoad.cpp.o
FAILED: CMakeFiles/reanimated.dir/src/main/cpp/OnLoad.cpp.o
D:\AndroidSDK\ndk\25.0.8775105\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=i686-none-linux-android21 --sysroot=D:/AndroidSDK/ndk/25.0.8775105/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dreanimated_EXPORTS -I../../../../../Common/cpp/Tools -I../../../../../Common/cpp/SpecTools -I../../../../../Common/cpp/NativeModules -I../../../../../Common/cpp/SharedItems -I../../../../../Common/cpp/ReanimatedRuntime -I../../../../../Common/cpp/Registries -I../../../../../Common/cpp/LayoutAnimations -I../../../../../Common/cpp/AnimatedSensor -I../../../../../Common/cpp/Fabric -I../../../../../Common/cpp/hidden_headers -I../../../../src/main/cpp -I../../../../ -I../../../../build/third-party-ndk/boost/boost_1_63_0 -I../../../../build/third-party-ndk/double-conversion -I../../../../build/third-party-ndk/folly -I../../../../build/third-party-ndk/glog/exported -ID:/demo/team/node_modules/react-native/React -ID:/demo/team/node_modules/react-native/React/Base -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni -ID:/demo/team/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/jni -ID:/demo/team/node_modules/react-native/ReactCommon -ID:/demo/team/node_modules/react-native/ReactCommon/callinvoker -ID:/demo/team/node_modules/react-native/ReactCommon/jsi -ID:/demo/team/node_modules/react-native/ReactCommon/hermes -ID:/demo/team/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -ID:/demo/team/node_modules/react-native/ReactCommon/runtimeexecutor -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule/core -ID:/demo/team/node_modules/react-native/ReactCommon/turbomodule -ID:/demo/team/node_modules/react-native/ReactCommon/yoga -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DREACT_NATIVE_MINOR_VERSION=68 -DREANIMATED_VERSION=3.4.0 -DHERMES_ENABLE_DEBUGGER=0 -fexceptions -fno-omit-frame-pointer -frtti -fstack-protector-all -std=c++17 -Wall -Werror -DDEBUG -DJS_RUNTIME_JSC=1 -fno-limit-debug-info -fPIC -std=gnu++1z -MD -MT CMakeFiles/reanimated.dir/src/main/cpp/OnLoad.cpp.o -MF CMakeFiles\reanimated.dir\src\main\cpp\OnLoad.cpp.o.d -o CMakeFiles/reanimated.dir/src/main/cpp/OnLoad.cpp.o -c ../../../../src/main/cpp/OnLoad.cpp
../../../../src/main/cpp/OnLoad.cpp:1:10: fatal error: 'fbjni/fbjni.h' file not found
#include <fbjni/fbjni.h>
^~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
缺少fbjni库
缺少fbjni/fbjni.h头文件
看下是不是少了依赖
或者手动下载React Native Reanimated仓库把头文件复制到项目中
【以下回答由 GPT 生成】
我很抱歉,但是您没有给出具体的问题需要解决。请您提供一个具体的问题,我将尽力给出解决方案。