-4

Enter image description here

All of the Extras is an upgrade, and when I make run build the project, it gives me this error:

FAILURE: Build failed with an exception.

* What went wrong:
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\java\jdk-19\bin\java.exe

* 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
Exception: Gradle task assembleDebug failed with exit code 1

I am using Visual Studio Code and the emulator by Android Studio.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • 1
    Also, welcome to SO! Please take a look at [ask] – MendelG Dec 30 '22 at 19:25
  • 1
    Please review *[Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/)* (e.g., *"Images should only be used to illustrate problems that* ***can't be made clear in any other way,*** *such as to provide screenshots of a user interface."*) and [do the right thing](https://stackoverflow.com/posts/74964987/edit). Thanks in advance. – Peter Mortensen Dec 31 '22 at 00:16
  • This is the subject of [a meta question](https://meta.stackexchange.com/questions/385365/how-can-i-change-the-markdown-on-a-post-that-was-created-using-the-ask-wizard). – Peter Mortensen Dec 31 '22 at 00:17
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 31 '22 at 09:09

1 Answers1

0

Don't add java.exe in your environmental variable path. End it with bin.

For example, 'C:\Program Files\java\jdk-19\bin'. That's it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131