FAILURE: Build failed with an exception.
-
Where:
Build file ‘D:Mobile AppExpoArtGrassAppandroidappbuild.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 17 to run. You are currently using Java 11.
Your current JDK is located in C:UsersPCAppDataLocaljdk-11.0.2
You can try some of the following options:
– changing the IDE settings.
– changing the JAVA_HOME environment variable.
– changingorg.gradle.java.home
ingradle.properties
.
- 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 28s
5 actionable tasks: 1 executed, 4 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 Failed to build the app.
Error: Command failed with exit code 1: gradlew.bat app:bundleRelease
at makeError (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communitycli-platform-androidnode_modulesexecaliberror.js:60:11)
at module.exports.sync (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communitycli-platform-androidnode_modulesexecaindex.js:194:17)
at build (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communitycli-platform-androidbuildcommandsbuildAndroidindex.js:68:22)
at Object.buildAndroid [as func] (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communitycli-platform-androidbuildcommandsbuildAndroidindex.js:60:10)
at Command.handleAction (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communityclibuildindex.js:118:23)
at Command.listener [as _actionHandler] (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communityclinode_modulescommanderlibcommand.js:482:17)
at D:Mobile AppExpoArtGrassAppnode_modules@react-native-communityclinode_modulescommanderlibcommand.js:1283:65
at Command._chainOrCall (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communityclinode_modulescommanderlibcommand.js:1177:12)
at Command._parseCommand (D:Mobile AppExpoArtGrassAppnode_modules@react-native-communityclinode_modulescommanderlibcommand.js:1283:27)
at D:Mobile AppExpoArtGrassAppnode_modules@react-native-communityclinode_modulescommanderlibcommand.js:1081:27
info Run CLI with –verbose flag for more details.
npx react-native build-android –mode=release
Aris IT Artgrass is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.