[英]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.