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 FilesAndroidAndroid Studiojrebinjava.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
3
Answers
if it doesn’t work
Go To the android studio directory (Default C:Program FilesAndroidAndroid Studio) remove the JRE folder run cmd as administrator
cd C:Program FilesAndroidAndroid Studio mklink /D "jre" "jbr" – REF.
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.