执行npx react-native run-android ==>任务“:react-native-reanimated:configureCMakeDebug[arm 64-v8 a]”时出错

d7v8vwbk  于 2023-04-22  发布在  React
关注(0)|答案(3)|浏览(1005)

info JS server already running. info正在安装应用程序...
配置项目:react-native-reanimated Native libs debug enabled:false Android gradle plugin:7.2.1 Gradle:7.5.1 building Reanimated2警告:从Android Gradle Plugin 8.0发布Maven时,不会自动创建软件组件。要选择加入未来的行为,请在gradle.properties文件中设置Gradle属性android. disableAutomaticComponentCreation = true,或使用新的发布DSL。
任务:react-native-reanimated:downloadHermes最新版本下载https:www.example.comgithub.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7
任务:react-native-reanimated:downloadBoost UP-TO-DATE下载https:www.example.comboostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz
任务:react-native-reanimated:downloadDoubleConversion最新下载https:www.example.comgithub.com/google/double-conversion/archive/v1.1.6.tar.gz
任务:react-native-reanimated:downloadFolly最新版本下载https:www.example.comgithub.com/facebook/folly/archive/v2021.07.22.00.tar.gz
任务:react-native-reanimated:downloadGlog最新版本下载https:www.example.comgithub.com/google/glog/archive/v0.3.5.tar.gz
任务:react-native-reanimated:configureCMakeDebug [arm64-v8a]失败
此版本中使用了已弃用的Gradle功能,使其与Gradle 8.0不兼容。
您可以使用'--warning-mode all'来显示各个弃用警告,并确定它们是否来自您自己的脚本或插件。
参见https:www.example.com 163可执行任务:docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings 163 actionable tasks: 6 executed, 157 up-to-date
失败:构建完成,但有2次失败。

1:任务失败,出现异常。

  • 出了什么问题:任务“:react-native-reanimated:configureCMakeDebug [arm64-v8a]”执行失败。

[CXX1405]使用D:\c2c_mobile\node_modules\react-native-reanimated\android\CMakeLists. txt构建cmake时出错:生成命令失败。执行进程C:\Users\User\AppData\Local\Android\Sdk\cmake\3.18.1\bin\cmake.exe时出错,参数{- HD:\c2c_mobile\node_modules\react-native-reanimated\android-DCMAKE_SYSTEM_NAME = Android-DCMAKE_EXPORT_COMPILE_COMMANDS = ON-DCMAKE_SYSTEM_VERSION = 23-DANDROID_PLATFORM = android-23-DAN DROID_ABI = arm64-v8a-DCMAKE_ANDROID_ARCH_ABI = arm64-v8a-DANDROID_NDK = C:\Users\User\AppData\Local\Android\Sdk\ndk\21.4.7075529-DCMAKE_ANDROID_NDK = C:\Users\User\AppData\Local\Android\Sdk\ndk\21.4.7075529-DCMAKE_TOOLCHAIN_FILE = C:\User\User\AppData\Local\Android\Sdk\ndk\21.4.7075529\build\cmake\android.toolchain.cmake-DCMAKE_MAKE_PROGRAM = C:\Users\User\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe-DCMAKE_CXX_FLAGS =-fstack-protector-all-DCMAKE_LIBRARY_OUTPUT_DIRECTORY = D:\c2c_mobile\node_modules\react-native-reanimated\android\build\intermediates\cxx\Debug\2w3pu2p1\obj\arm64-v8a-DCMAKE_RUN TIME_OUTPUT_DIRECTORY = D:Copyright © 2018 - 2019 www.c2c.com版权所有类型=调试-BD:Copyright © 2018 - 2019 www.cnjs.com. All Rights Reserved.京ICP备05018888号-1京公网安备110105020000118号false-DREACT_NATIVE_TARGET_VERSION = 70-DANDROID_TOOLCHAIN = clang-DBOOST_VERSION = 1_76_0-DNODE_MODULES_DIR = D:\c2c_mobile\node_modules-DJS_RUNTIME = hermes-DJS_RUNTIME_DIR = D:\ c2c_mobile\node_modules\react-native\sdks\hermes-DCLIENT_SIDE_BUILD = true-DIS_NEW_ARCHITECTURE_ENABLED = false-DPLAYGROUND_APP_NAME = D:\c2c_mobile\android\app-DRNVERSION = 70}

  • 尝试:

使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获取完整见解。===================================================================================================================================================================================================================

2:任务失败,出现异常。

  • 出了什么问题:java. lang. StackOverflowError(无错误消息)
  • 尝试:

使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获取完整见解。===================================================================================================================================================================================================================

23秒内构建失败
error无法安装应用程序。请确保您已设置Android开发环境:https:www.example.com.错误:命令失败:reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
失败:构建完成,但有2次失败。

1:任务失败,出现异常。

  • 出了什么问题:任务“:react-native-reanimated:configureCMakeDebug [arm64-v8a]”执行失败。

[CXX1405]使用D:\c2c_mobile\node_modules\react-native-reanimated\android\CMakeLists. txt构建cmake时出错:生成命令失败。执行进程C:\Users\User\AppData\Local\Android\Sdk\cmake\3.18.1\bin\cmake.exe时出错,参数{- HD:\c2c_mobile\node_modules\react-native-reanimated\android-DCMAKE_SYSTEM_NAME = Android-DCMAKE_EXPORT_COMPILE_COMMANDS = ON-DCMAKE_SYSTEM_VERSION = 23-DANDROID_PLATFORM = android-23-DAN DROID_ABI = arm64-v8a-DCMAKE_ANDROID_ARCH_ABI = arm64-v8a-DANDROID_NDK = C:\Users\User\AppData\Local\Android\Sdk\ndk\21.4.7075529-DCMAKE_ANDROID_NDK = C:\Users\User\AppData\Local\Android\Sdk\ndk\21.4.7075529-DCMAKE_TOOLCHAIN_FILE = C:\User\User\AppData\Local\Android\Sdk\ndk\21.4.7075529\build\cmake\android.toolchain.cmake-DCMAKE_MAKE_PROGRAM = C:\Users\User\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe-DCMAKE_CXX_FLAGS =-fstack-protector-all-DCMAKE_LIBRARY_OUTPUT_DIRECTORY = D:\c2c_mobile\node_modules\react-native-reanimated\android\build\intermediates\cxx\Debug\2w3pu2p1\obj\arm64-v8a-DCMAKE_RUN TIME_OUTPUT_DIRECTORY = D:Copyright © 2018 - 2019 www.c2c.com版权所有类型=调试-BD:Copyright © 2018 - 2019 www.cnjs.com. All Rights Reserved.京ICP备05018888号-1京公网安备110105020000118号false-DREACT_NATIVE_TARGET_VERSION = 70-DANDROID_TOOLCHAIN = clang-DBOOST_VERSION = 1_76_0-DNODE_MODULES_DIR = D:\c2c_mobile\node_modules-DJS_RUNTIME = hermes-DJS_RUNTIME_DIR = D:\ c2c_mobile\node_modules\react-native\sdks\hermes-DCLIENT_SIDE_BUILD = true-DIS_NEW_ARCHITECTURE_ENABLED = false-DPLAYGROUND_APP_NAME = D:\c2c_mobile\android\app-DRNVERSION = 70}

  • 尝试:

使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获取完整见解。===================================================================================================================================================================================================================

2:任务失败,出现异常。

  • 出了什么问题:java. lang. StackOverflowError(无错误消息)
  • 尝试:

使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获取完整见解。===================================================================================================================================================================================================================

23秒内构建失败

at makeError (D:\c2c_mobile\node_modules\execa\index.js:174:9)
at D:\c2c_mobile\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (D:\c2c_mobile\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\c2c_mobile\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:142:9)

info使用--verbose标志运行CLI以了解更多详细信息。

4xy9mtcn

4xy9mtcn1#

我修复了上述问题。请尝试重新安装动画版本。

1.npm uninstall react-native-reanimated 2.npm install react-native-reanimated@2.9.1

这是100%为我工作。

wvt8vs2t

wvt8vs2t2#

我也遇到过类似的问题,我的方法是删除NDK文件夹,对你来说,我可以看到它位于这里C:\Users\User\AppData\Local\Android\Sdk\ndk\。删除它,然后执行./gradlew clean并运行react-native run-android

lp0sw83n

lp0sw83n3#

我可以 * 找出解决方案 *.你可以在你的babel.config.js文件中的下面一行
插件:['react-native-reanimated/plugin'],
请参考此网站https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/

相关问题