I am facing an issue, wherein when I run the command “flutter run”, it gives me two emulator options to choose from. No matter what I choose I get a “JAVA_HOME” error. And the emulator doesn’t run.
To solve this issue we can make changes in .idx/dev.nix.
Add this line of code in the file mentioned above
env = {
JAVA_HOME = "/lib64/openjdk";
};