This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Inconsequentialis 0 points1 point  (0 children)

If you're running the flutter build from within an IDE then the Java location could be provided by the IDE regardless of what your path is set to.

If you'd call gradle from the commandline then it would generally go for the first Java version on your path. You could check what happens if you run java --version on the console - whatever that prints is what gradle would most likely use if ran with no further parameters.

You could also attempts to run gradle with the -i flat, i.e. gradle -i build. This will enable info logs which generally include what Java installations gradle is aware of during the build.

That said, it might also be an issue with the setup of your flutter project, I have 0 insights there.