I'm getting this error in flutter app

Launching lib/main.dart on Android SDK built for x86 in debug mode…

ERROR: JAVA_HOME is not set and no ‘java’ command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Error: Gradle task assembleDebug failed with exit code 1

Exited (1).

Is this a workspace imported from github? Seems like you need to install java? Can you try adding pkgs.jdk (you want want to try pkgs.jdk21 or pkgs.jdk17 for specific versions) and rebuild the environment please?

Now I solve this only adding .idx