Expo SDK 46 在同步 Gradle 时抛出 CMAKE 错误

sew*_*ewb 7 android cmake node.js react-native expo

我已经成功地在 3 个不同的存储库中复制了这个。我正在尝试从裸露的 Expo 项目同步 Android studio 中的 gradle 项目,但我不断收到以下错误

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
linked by target "expo-modules-core" in directory /Users/sebsmith/test-cmake/node_modules/expo-modules-core/android
FOLLY_LIB
linked by target "expo-modules-core" in directory /Users/sebsmith/test-cmake/node_modules/expo-modules-core/android
JSEXECUTOR_LIB
linked by target "expo-modules-core" in directory /Users/sebsmith/test-cmake/node_modules/expo-modules-core/android
JSI_LIB
linked by target "expo-modules-core" in directory /Users/sebsmith/test-cmake/node_modules/expo-modules-core/android
REACT_NATIVE_JNI_LIB
linked by target "expo-modules-core" in directory /Users/sebsmith/test-cmake/node_modules/expo-modules-core/android
REACT_NATIVE_MODULES_CORE
linked by target "expo-modules-core" in directory /Users/sebsmith/test-cmake/node_modules/expo-modules-core/android
Run Code Online (Sandbox Code Playgroud)

我已经运行expo install&&expo-cli doctor --fix-dependencies并且所有模块都是最新的。

可复制的步骤

npx create-expo-app test-cmake
cd test-cmake
rm yarn.lock
npm install
expo install
npx expo prebuild
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

小智 0

这是一个临时解决方案,但是进入您的版本package.json并降级expo-modules-core到 9.2 这给我带来了其他 Expo 软件包的一些错误,这些软件包期望更高版本expo-modules-coreVisionCamera出于某种原因,我想到了一个),所以在尝试时请记住这一点这个解决方案。如果没有的话就等更新吧expo-modules-core