PS C:\D-drive\MyLearning\FontEnd Learning\ReactNativeCLI\AwesomeProject> npx react-native doctor>>
Common
✓ Node.js - Required to execute JavaScript code
✓ npm - Required to install NPM dependencies
✓ Metro - Required for bundling the JavaScript code
Android
✓ Adb - Required to verify if the android device is attached correctly
✓ JDK - Required to compile Java code
✓ Android Studio - Required for building and installing your app on Android
✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
✓ Gradlew - Build tool required for Android builds
✖ Android SDK - Required for building and installing your app on Android
- Versions found: N/A
- Version supported: 35.0.0
Errors: 1
Warnings: 0
Attempting to fix 1 issue...
Android
✔ Android SDK configured. You might need to restart your PC for all changes to take effect.
PS C:\D-drive\MyLearning\FontEnLearning\ReactNativeCLI\AwesomeProject>
I fixed the error, but it isn't fixing what I have to do
PS C:\D-drive\MyLearning\FontEnLearning\ReactNativeCLI\AwesomeProject
npx react-native run-android
info A dev server is already running for this project on port 8081.
info Installing the app...
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
FAILURE: Build failed with an exception.
* Where:
Settings file 'C:\D-drive\MyLearning\FontEndLearning\ReactNativeCLI\AwesomeProject\node_modules\@react-native\gradle-plugin\settings.gradle.kts' line: 16
* What went wrong:
An exception occurred applying plugin request [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '0.5.0']
> Failed to apply plugin class 'org.gradle.toolchains.foojay.FoojayToolchainsPlugin'. > FoojayToolchainsPlugin needs Gradle version 7.6 or higher
* 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 FAILURE: Build failed with an exception. * Where: Settings file 'C:\D-drive\MyLearning\FontEnd Learning\ReactNativeCLI\AwesomeProject\node_modules@react-native\gradle-plugin\settings.gradle.kts' line: 16 * What went wrong: An exception occurred applying plugin request [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '0.5.0'] > Failed to apply plugin class 'org.gradle.toolchains.foojay.FoojayToolchainsPlugin'. > FoojayToolchainsPlugin needs Gradle version 7.6 or higher * 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.
Even though I have all the environment variables set correctly, my project is not starting even if I am trying to start it. What is the solution?