简体   繁体   English

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

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

I am facing this issue.我正面临这个问题。 Can anyone help me out?谁能帮我吗? while running react native application.在运行反应本机应用程序时。 I am getting this error.我收到此错误。 I installed all the dependencies and software that were required even though I was getting this我安装了所有需要的依赖项和软件,即使我得到了这个

> 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

The new version of react-native-reanimated (v2.10.0) has this issue as discussed here and here .新版本的react-native-reanimated reanimated (v2.10.0) 有这个问题,如这里这里所讨论的。 A PR has been created to fix this issue.已创建PR来解决此问题。 So till a new version is released, you can try these workarounds -因此,在发布新版本之前,您可以尝试这些解决方法 -

Install CMake 3.18.1 using CLI or Android Studio.使用 CLI 或 Android Studio 安装 CMake 3.18.1。

CLI命令行界面

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

Android Studio Android工作室

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

Rebuild the app.重建应用程序。 If it's still failing then downgrade the package to previous version and rebuild.如果仍然失败,则将 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.

相关问题 React Native 中的任务 ':react-native-reanimated:androidJavadoc' 执行失败 - Execution failed for task ':react-native-reanimated:androidJavadoc' in React Native ReactNative 错误:任务 ':react-native-reanimated:checkDebugManifest' 执行失败 - ReactNative error: Execution failed for task ':react-native-reanimated:checkDebugManifest' React-Native-Reanimated: 错误: node_modules\react-native-reanimated\src\index.ts: - React-Native-Reanimated: error: node_modules\react-native-reanimated\src\index.ts: React Native——无法确定任务“:app:mergeDebugAssets”的依赖关系 - React Native -- Could not determine the dependencies of task ':app:mergeDebugAssets' 无法确定任务“:notifee_react-native:compileDebugAidl”的依赖关系 - Could not determine the dependencies of task ':notifee_react-native:compileDebugAidl' React Native:无法确定任务“:app:installDebug”的依赖关系 - React Native: Could not determine the dependencies of task ':app:installDebug' 评估项目“:react-native-reanimated”时出现问题 - A problem occurred evaluating project ':react-native-reanimated' react-native-reanimated react-native-screens 未打开反应本机应用程序 - react native Application doesn't open with react-native-reanimated react-native-screens installed 运行反应原生裸项目导致错误配置项目':react-native-reanimated'时出现问题 - Running react native bare project results in error A problem occurred configuring project ':react-native-reanimated' 构建失败“配置项目时出现问题:react-native-reanimated”。 在 React Native 项目中 - Build failed 'A problem occurred configuring project ':react-native-reanimated'. in React native project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM