i install android studio , node js, JDK 17 with the config of this video : https://www.youtube.com/watch?v=G0wrlZvDjrE
But when i run the app with the cmd : npx react-native start.
I have this error message.
:ReactNative:Running '[node, -e, try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:UsersvalenDocumentsGitHubSuperAppnode_modules@react-native-communitycli-platform-androidnative_modules.gradle' line: 397
* What went wrong:
A problem occurred evaluating script.
> Could not find method exec() for arguments [ReactNativeModules$_getCommandOutput_closure16@2520ef93] on object of type org.gradle.api.internal.provider.DefaultProviderFactory_Decorated.
* 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.
Someone can help me to fix this ?
Thank you,
If i run : npx react-native run-android, i have a error message little différente.
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
:ReactNative:Running '[node, -e, try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:UsersvalenDocumentsGitHubSuperAppnode_modules@react-native-communitycli-platform-androidnative_modules.gradle' line: 397
* What went wrong:
A problem occurred evaluating script.
> Could not find method exec() for arguments [ReactNativeModules$_getCommandOutput_closure16@5d05d47e] on object of type org.gradle.api.internal.provider.DefaultProviderFactory_Decorated.
* 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 1s
error Failed to install the app. Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
:ReactNative:Running '[node, -e, try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}]' command failed. FAILURE: Build failed with an exception. * Where: Script 'C:UsersvalenDocumentsGitHubSuperAppnode_modules@react-native-communitycli-platform-androidnative_modules.gradle' line: 397 * What went wrong: A problem occurred evaluating script. > Could not find method exec() for arguments [ReactNativeModules$_getCommandOutput_closure16@5d05d47e] on object of type org.gradle.api.internal.provider.DefaultProviderFactory_Decorated. * 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 1s.
info Run CLI with --verbose flag for more details.
The phone run but i don’t have the app.
I only change the url of C:UsersvalenDocumentsGitHubSuperAppandroidgradlewrappergradle-wrapper because the version of gradle don’t match with JDK 17. then i put gradle 7.3.
If i run npx react-native doctor, i have a error ==> ✖ Android SDK - Required for building and installing your app on Android
- Versions found: N/A
But if i fix this and i restart the pc, the probleme stay :/
Valentin Georis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.