首页 > 解决方案 > 安装 React Drawer Navigation v6 后 React Native 错误任务:app:checkDebugAarMetadata FAILED

问题描述

安装 react-navigation-drawer 后,我收到了 react 本机应用程序错误。请帮忙

命令:npm run android

> Task :app:checkDebugAarMetadata FAILED
7 actionable tasks: 2 executed, 5 up-to-date
[..................] / : timing config:load:flatten Completed in 3ms
FAILURE: Build failed with an exception.
[..................] / : timing config:load:flatten Completed in 3ms
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform react-native-reanimated-65-jsc.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
      > Execution failed for JetifyTransform: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar.
         > Transform's input file does not exist: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar. (See https://issuetracker.google.com/issues/158753935)

* 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 4s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform react-native-reanimated-65-jsc.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
      > Execution failed for JetifyTransform: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar.
         > Transform's input file does not exist: /home/risman/drive/android/project/POS/node_modules/react-native-reanimated/android/react-native-reanimated-65-jsc.aar. (See https://issuetracker.google.com/issues/158753935)

* 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 4s

at makeError (/home/risman/drive/android/project/POS/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
at /home/risman/drive/android/project/POS/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/home/risman/drive/android/project/POS/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:106:5)
at async Command.handleAction (/home/risman/drive/android/project/POS/node_modules/@react-native-community/cli/build/index.js:186:9)

我在安装指南的官方文档中关注了如何安装 react-navigation-drawer

标签: androidreact-nativereact-navigation

解决方案


推荐阅读