Closed yswtrue closed 1 year ago
How is this related to Nixpkgs?
But I still have many memory
~/Code free -h
total used free shared buff/cache available
内存: 61Gi 35Gi 2.5Gi 3.4Gi 23Gi 22Gi
交换: 67Gi 170Mi 67Gi
Maybe it is because of missing some dependences.
I have enable libvirtd
and installed bridge-utils
@yswtrue sadly error from android studio is missleading
this happens when android studio cant access kvm device, this has happened to me in the past when i was using
systemd.enableUnifiedCgroupHierarchy = true
so I'd start by checking you permissions to /dev/kvm
and see if in your configuration nothing else is using kvm device
if /dev/kvm device is missing check for intel_kvm or amd_kvm kernel modules ( depending on your hardware )
I have also set systemd.enableUnifiedCgroupHierarchy = false
and there is /dev/kvm
and my user is in kvm
group.
and I can run emulator in Virtual Machine Manager
but in android-studio there is no kvm
group
@yswtrue can you provide your configuration ? otherwise I would suggest remove most of things from your configuration,.
something basic like this
environment.systemPackages = with pkgs; [ android-studio ] ;
works for me, as in, I can run emulator
nix-info -m
- system: `"x86_64-linux"`
- host os: `Linux 6.1.10, NixOS, 23.05 (Stoat), 23.05.20230210.9943fcc`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.13.2`
- channels(root): `"nixos-22.05"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
I have disable waydroid
and libvirtd
, and android-studio emulator works for me now, but I can't running android-studio emulator and virtualbox emulator at tie same time.
Thank you very much.
@kirillrdy
closing as resolved, feel free to reopen
@kirillrdy i cannot disable libvirt, and android studio doesn't work because of that issue.
edit: i could fix it with systemd.enableUnifiedCgroupHierarchy = lib.mkForce true;
Describe the bug
Android Studio can't run emulators, display:
Not enough memory to run HAXM
Steps To Reproduce
Steps to reproduce the behavior:
android-studio
inenvironment.systemPackages
android-studio
Not enough memory to run HAXM
Expected behavior
Emulator can run
Screenshots
Additional context
Notify maintainers
@alapshin
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.