繁体   English   中英

React Native - 无法确定任务':react-native-reanimated:generateJsonModelDebug'的依赖关系

[英]React Native - Could not determine the dependencies of task ':react-native-reanimated:generateJsonModelDebug'

我正面临这个问题。 谁能帮我吗? 在运行反应本机应用程序时。 我收到此错误。 我安装了所有需要的依赖项和软件,即使我得到了这个

> 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

新版本的react-native-reanimated reanimated (v2.10.0) 有这个问题,如这里这里所讨论的。 已创建PR来解决此问题。 因此,在发布新版本之前,您可以尝试这些解决方法 -

使用 CLI 或 Android Studio 安装 CMake 3.18.1。

命令行界面

$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.18.1"

Android工作室

Go to Tools > SDK Manager > SDK Tools > Show Package Details and select CMake version 3.18.1 and Apply.

重建应用程序。 如果仍然失败,则将 package 降级到以前的版本并重建。

yarn add react-native-reanimated@2.9.1
OR
npm install react-native-reanimated@2.9.1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM