我正面临着这个问题。有人能帮我吗?当运行时,响应本机应用程序。我得到了这个错误。我安装了所需的所有依赖项和软件,即使我得到了这个
> Configure project :react-native-reanimated
Native libs debug enabled: false
Android gradle plugin: 4.1.1
Gradle: 6.7.1
building Reanimated2
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':react-native-reanimated:generateJsonModelDebug'.
> CMake '3.18.1' was not found in PATH or by cmake.dir property.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with
--verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! offket@0.0.1 android: `react-native run-android`
npm ERR! Exit status 1发布于 2022-08-27 13:40:18
新版本的react-native-reanimated (v2.10.0)如这里和这里所讨论的那样存在这个问题。已经创建了一个按下来解决此问题。所以在新版本发布之前,你可以试试这些解决办法-
使用CLI或Android安装CMake 3.18.1。
CLI
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.18.1"Android Studio
转到Tools > SDK Manager > SDK Tools > Show Package Details,选择CMake版本3.18.1并应用。
重建应用程序。如果仍然失败,那么将包降级到以前的版本并重新构建。
yarn add react-native-reanimated@2.9.1
OR
npm install react-native-reanimated@2.9.1https://stackoverflow.com/questions/73502853
复制相似问题