1

I tried every solution I can think about, but it still not working.

I'm getting this error while running my app.

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\Android\Android Studio\jre\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.

3 Answers3

0
  1. add java to system environment variable.
  2. restart your IDE

if it doesn't work

  1. try to run after restarting your PC.
0

Go To the android studio directory (Default C:\Program Files\Android\Android Studio) remove the JRE folder run cmd as administrator

cd C:\Program Files\Android\Android Studio mklink /D "jre" "jbr" - REF.

Muhammad Ashir
  • 418
  • 2
  • 14
0

I have faced the same problem, you have to do as what income in these posts:

1- JAVA_HOME & JAVA path

2- This to return every thing to the normal

after that every thing will be ok, I've done all of that since a while today.