Trouble with setting up an Android Studio flake

Hi

I have created this flake:

{
  description = "Android Studio";

  inputs = {
    stable.url = "github:NixOS/nixpkgs/nixos-26.05";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs =
    {
      self,
      stable,
      flake-utils,
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import stable {
        inherit system;
        config.allowUnfree = true;
        config.android_sdk.accept_license = true;
      };
      in {
        devShells = {
          default = pkgs.mkShell {
            buildInputs = with pkgs; [
              # Java
              javaPackages.compiler.openjdk17
              maven
              gradle

              # Editors/IDEs
              android-studio-full
              android-studio-tools
              android-tools
            ];

            shellHook = ''
              export JAVA_HOME="${pkgs.javaPackages.compiler.openjdk17}"
              export MAVEN_OPTS="-Dmaven.repo.local=./.m2"
              export GRADLE_USER_HOME=./.gradle 
            '';
          };
        };
      }
    );
}

But when I start Android Studio, no SDKs are installed and some are only partially installed:

Screen 1:

Screen 2:

Screen 3:

If I choose Android 17.0, for example, I am back to screen 2.

What am I doing wrong here? How can I fix this problem?

Here are some console logs:

❯ android-studio 
=== nixpkgs Android Studio wrapper
  - ANDROID_HOME=/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk
  - ANDROID_NDK_ROOT=/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle
2026-06-02 04:36:32,250 [     23]   WARN - #c.i.i.p.PluginManager - Dist index is missing or corrupted; an OLD, DEPRECATED, SOON-TO-BE-UNSUPPORTED implementation will be used
2026-06-02 04:36:33,237 [   1010]   WARN - #c.i.o.v.n.p.FSRecords - Records storage [/home/neex/.cache/Google/AndroidStudio2025.3.4/caches/records.dat] was in use by process [OwnershipInfo{owner pid: 163244, acquired at: 1780373620935}] which is not exist now (wasn't closed properly/crashed?) -> re-acquiring forcibly
2026-06-02 04:36:33,248 [   1021]   WARN - #c.i.o.v.n.p.PersistentFSLoader - [VFS load problem]: VFS wasn't safely shut down: records.wasClosedProperly is false
2026-06-02 04:36:33,260 [   1033]   WARN - #c.i.o.v.n.p.PersistentFSLoader - [VFS load problem]: NOT_CLOSED_PROPERLY recovered, no problems remain
WARNING: A restricted method in java.lang.foreign.Linker has been called
WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module

2026-06-02 04:36:34,663 [   2436]   WARN - com.google.aiplugin.lucene.internal.vectorization.VectorizationProvider - Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.
2026-06-02 04:36:35,398 [   3171]   WARN - #com.android.tools.idea.welcome.wizard.FirstRunWizardModel - Observed package id 'ndk;29.0.14206865' in inconsistent location '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk/29.0.14206865')
2026-06-02 04:36:35,642 [   3415]   WARN - #com.android.tools.idea.progress.RawProgressReporterAdapter - Observed package id 'ndk;29.0.14206865' in inconsistent location '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk/29.0.14206865')
2026-06-02 04:36:36,443 [   4216]   WARN - #com.android.tools.idea.welcome.install.InstallableSdkComponentTreeNode - Observed package id 'ndk;29.0.14206865' in inconsistent location '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk/29.0.14206865')
2026-06-02 04:36:36,532 [   4305]   WARN - #com.android.tools.idea.welcome.install.InstallableSdkComponentTreeNode - Observed package id 'ndk;29.0.14206865' in inconsistent location '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk/29.0.14206865')
2026-06-02 04:36:36,608 [   4381]   WARN - #com.android.tools.idea.welcome.install.InstallableSdkComponentTreeNode - Observed package id 'ndk;29.0.14206865' in inconsistent location '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk/29.0.14206865')
2026-06-02 04:36:36,672 [   4445]   WARN - #com.android.tools.idea.welcome.install.InstallableSdkComponentTreeNode - Android Virtual Device depends on the the packages that are not available: system-images;android-37.0;google_apis_playstore;x86_64
2026-06-02 04:36:37,508 [   5281]   WARN - #com.android.tools.idea.welcome.install.SdkComponentInstaller - Observed package id 'ndk;29.0.14206865' in inconsistent location '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk/29.0.14206865')
2026-06-02 04:36:42,707 [  10480]   WARN - #com.android.tools.idea.welcome.install.SdkComponentInstaller - Observed package id 'ndk;29.0.14206865' in inconsistent location '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk-bundle' (Expected '/nix/store/fn1w5cjjsqnb7rbj8q01fcgfkzm38n9w-androidsdk/libexec/android-sdk/ndk/29.0.14206865')
2026-06-02 04:38:43,010 [ 130783]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - use other group instead of unexpected one: com.android.studio.ml.bot.mainConfigurable
2026-06-02 04:38:43,011 [ 130784]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - Use <groupConfigurable> to specify custom configurable group: other
2026-06-02 04:40:39,712 [ 247485]   WARN - #c.i.o.o.e.ConfigurableCardPanel - auto-dispose 'Android SDK' id=AndroidSdkUpdater
2026-06-02 04:40:39,712 [ 247485]   WARN - #c.i.o.o.e.ConfigurableCardPanel - auto-dispose 'Android SDK' id=AndroidSdkUpdater
2026-06-02 04:40:39,712 [ 247485]   WARN - #c.i.o.o.e.ConfigurableCardPanel - auto-dispose 'Android SDK' id=AndroidSdkUpdater
2026-06-02 04:41:16,772 [ 284545]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - use other group instead of unexpected one: com.android.studio.ml.bot.mainConfigurable
2026-06-02 04:41:16,772 [ 284545]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - Use <groupConfigurable> to specify custom configurable group: other