I'm trying to build a react-native project created by default (so no problems normally), but when I use npx react-native run-android, I get the following error. When I run a program that I had already run before, since the outputs file exists, it does not cause any errors.
Current Behavior
`C:\Users\arsen\OneDrive\Documents\ReactNativeProjects\test>npx react-native run-android
info JS server already running.
info Installing the app...
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.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
at makeError (C:\Users\arsen\OneDrive\Documents\ReactNativeProjects\test\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Users\arsen\OneDrive\Documents\ReactNativeProjects\test\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\arsen\OneDrive\Documents\ReactNativeProjects\test\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
at async Command.handleAction (C:\Users\arsen\OneDrive\Documents\ReactNativeProjects\test\node_modules\@react-native-community\cli\build\index.js:108:9)
info Run CLI with --verbose flag for more details.`
Expected Behavior
I'm trying to build a react-native project created by default (so no problems normally), but when I use npx react-native run-android, I get the following error. When I run a program that I had already run before, since the outputs file exists, it does not cause any errors.
Current Behavior
`C:\Users\arsen\OneDrive\Documents\ReactNativeProjects\test>npx react-native run-android info JS server already running. info Installing the app...
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.
Try:
2: Task failed with an exception.
What went wrong: java.lang.StackOverflowError (no error message)
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 1m 39s
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.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.
Try:
2: Task failed with an exception.
What went wrong: java.lang.StackOverflowError (no error message)
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 1m 39s
info Run CLI with --verbose flag for more details.`
Thanks in advance.