-
Notifications
You must be signed in to change notification settings - Fork 937
Description
Environment
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.15.1
path: ~/.nvm/versions/node/v20.15.1/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v20.15.1/bin/yarn
npm:
version: 10.7.0
path: ~/.nvm/versions/node/v20.15.1/bin/npm
Watchman:
version: 2024.08.26.00
path: /usr/local/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK:
API Levels:
- "31"
- "32"
- "33"
- "34"
Build Tools:
- 30.0.3
- 33.0.0
- 33.0.1
- 34.0.0
System Images:
- android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby:
version: 3.3.4
path: /usr/local/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.2
wanted: 0.75.2
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Description
When npx react-native run-anroid, error occurs as soon. It says error occurs on android/settings.gradle but I haven't touched the setting file since it was fresh made app from npx @react-native-community/cli init. I tried deleting and installing react-native-community in the node_modules dir but same error happens. The error msg below:
info A dev server is already running for this project on port 8081.
info Installing the app...
8 actionable tasks: 2 executed, 6 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
ERROR: autolinkLibrariesFromCommand: process npx @react-native-community/cli config exited with error code: 1
FAILURE: Build failed with an exception.
* Where:
Settings file '/Users/mac/rn75test/android/settings.gradle' line: 3
* What went wrong:
A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: process npx @react-native-community/cli config exited with error code: 1
* 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 5s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
ERROR: autolinkLibrariesFromCommand: process npx @react-native-community/cli config exited with error code: 1 FAILURE: Build failed with an exception. * Where:
Settings file '/Users/mac/rn75test/android/settings.gradle' line: 3 * What went wrong:
A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: process npx @react-native-community/cli config exited with error code: 1 * 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 5s.
info Run CLI with --verbose flag for more details.Reproducible Demo
npx @react-native-community/cli initand put information.cd <the-repo-you-created>npx react-native run-anroid