Flutter doctor can't find Java bundle

I’m trying to get Flutter up and running on my NixOS machine, so I made a dev-shell to this end:

#  default.nix
let
  unstable = import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
    config = {
      allowUnfree = true;
      android_sdk.accept_license = true;
    };
  };
in
unstable.mkShell {
  packages = with unstable; [
    android-studio-full
    flutter
    android-tools
    jdk17
  ];
}

java -version gives me

openjdk version "17.0.14" 2025-01-21
OpenJDK Runtime Environment (build 17.0.14+7-nixos)
OpenJDK 64-Bit Server VM (build 17.0.14+7-nixos, mixed mode, sharing)

But when I run flutter doctor it says:

[!] Android Studio (version 2024.3)
    ✗ Unable to determine bundled Java version.
[!] Android Studio (version 2024.2)
    ✗ Unable to determine bundled Java version.

Also, why are the Android Studio versions different in the above log?