Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Value 'C:\Program Files\Java\jdk15.0.1' given for org.gradle.java.home Gradle property is invalid (Java home supplied is invalid)
* 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
Asked
Active
Viewed 532 times
0

halfer
- 19,824
- 17
- 99
- 186

Rihan Mohammed
- 1
- 1
-
1Possible duplicate question: [Kotlin could not find the required JDK tools in the Java installation](https://stackoverflow.com/questions/55286542/kotlin-could-not-find-the-required-jdk-tools-in-the-java-installation) – halfer Oct 30 '20 at 06:59
-
thanks for the suggestions , i have seen it and done accordingly still couldnot resolve it thats why i have posted this – Rihan Mohammed Oct 31 '20 at 09:54
-
Can you edit your question to explain why you think your question is a different situation? – halfer Oct 31 '20 at 10:52
-
actually i copy pasted the error given, probably because of the latest update in flutter. it has happen many times , i used to solve myself, but this time i couldnt so posted it here – Rihan Mohammed Oct 31 '20 at 11:18
-
What have you done to solve it yourself previously? – shreyasm-dev Oct 31 '20 at 14:08
-
i created java_home and added it to the path – Rihan Mohammed Nov 07 '20 at 11:06
1 Answers
0
Please Check the environment setting is the JDK path is Ok or Not. if not then add the JDK path in JAVAHOME. and I think you don't need to add this('C:\Program Files\Java\jdk15.0.1' ) path on Gradle. if the path variable is ok then it automatically knows the JDK.
thanks.

Dhali Abir
- 1
- 1
-
I checked the environment variable , everything is properly setup but still showing the error, please help me out – Rihan Mohammed Oct 29 '20 at 08:20