-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android-studio requires KVM? #41703
Comments
The simulator is using virtualization if your image cpu architecture matches the one on your host (i.e. x86_64). Adding a package probably does not help here.
Also enable depending on your cpu vendor the corresponding kernel module in configuration.nix:
|
I have a kvm device on my machine, and I just added kvm-intel like you suggest, but the problem persists. |
I am not sure what they expect to be present on the system, you could try |
@Mic92 How would I do that? running Also, I'm starting to think this might be an ELF problem. There are a whole bunch of executables android-studio downloaded into |
strace does not follow childs, you are only seeing the output for the wrapper shell script. Try |
android-studio builds a usernamespace that provides needed libraries in /usr/bin and /usr/lib using this function: https://nixos.org/nixpkgs/manual/#sec-fhs-environments |
See also: https://nixos.wiki/wiki/Android |
Ah, right. I forgot about that. So now I'm having this weird issue where inside the android-studio console, none of the normal executeables can be found. So I have to run it like
But then I get the error Which I think is just again the same issue of none of the normal executables can be found. EDIT: Whoops. I'm being silly, I just had to add |
So |
So it turns out the AVD Manager UI can't be launched from the command line, and there are other unrelated issues I'm getting trying to run the emulator directly. Is there some way I can find the relevant part of the output of |
Okay, I think I've managed to narrow it down to a range of 4 PIDs (those are the ones that connected when I tried to start the emulator from the UI), which gives me 1300 lines of |
I had the same issue, and this is what I found running a strace:
I added libGL to the list of requirements and it fixed it. I'll create a pull request. @Radvendii FYI, when using strace with a large program, use the "-p" option to connect to a running process. This way you can monitor it right before you perform the action that triggers the bug. ex. strace -p (pid) -o strace.out -f |
Without it, when starting an android emulator in some cases results in the cryptic, "KVM is required to run this AVD. Unknown Error" Fixes NixOS#41703
Issue description
When I install android-studio, and then try to run a simple hello world app, I get the error
in a pop-up window.
I tried adding KVM to where I thought it would reach the target, i.e.
but this had no discernible effect.
Steps to reproduce
android-studio
to systemPackagessudo nixos-rebuild switch
android-studio
Technical details
"x86_64-linux"
Linux 4.14.43, NixOS, 18.09pre140958.696c6bed4e8 (Jellyfish)
yes
yes
nix-env (Nix) 2.0.2
"nixos"
"nixos-18.09pre140682.5da85431fb1"
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: