Upon executing npx react-native run-android
, I encountered the following message in the terminal:
FAILURE: Build failed with an exception.
Where: Build file '/Users/vivek/Documents/Code-Here/React-Native/instaClone/android/app/build.gradle' line: 1
What went wrong: A problem occurred evaluating project ':app'.
Failed to apply plugin 'com.android.internal.application'. Android Gradle plugin requires Java 11 to run. The current environment is using Java 1.8. Suggested solutions include: - adjusting IDE settings - modifying JAVA_HOME variable - updating
org.gradle.java.home
ingradle.properties
.
- Try:
Run with --stacktrace option for a detailed stack trace. Use --info or --debug option for more log information. Employ --scan for comprehensive insights.
- For additional assistance, visit
BUILD FAILED in 7s
An error occurred during app installation. Ensure that the Android development environment is properly configured: https://reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
Where: Build file '/Users/vivek/Documents/Code-Here/React-Native/instaClone/android/app/build.gradle' line: 1
What went wrong: A problem occurred evaluating project ':app'.
Failed to apply plugin 'com.android.internal.application'. Android Gradle plugin requires Java 11 to run. The current environment is using Java 1.8. Suggested solutions include: - adjusting IDE settings - modifying JAVA_HOME variable - updating
org.gradle.java.home
ingradle.properties
.