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 | 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.
* Get more help at
Exception: Gradle task assembleDebug failed with exit code 1 |
flutter bug | flutter Android Studio Electric Eel | 2022.1.1 Patch 1 | Android Studio Electric Eel | 2022.1.1 Patch 1 bug.
Solution
Open the C:\Program Files\Android Android Studio\jbr and copy all of the folders and files and paste to C:\Program Files\Android Android
Studio\jre
Define the JDK on Users env, in path- C:\Program Files\Java\jdk-19\bin, define with path root in users path,
Define JDK on System env, in system path define without \bin root, like that C:\Program Files\Java\jdk-19, it will be okey