0

I know there a different thread with a similar question, but my issue is different from any of the answers to that question.

So whenever I try to launch my emulator it's giving me this error. Emulator was killed This happened when I accidentally force quit the emulator.

Fix I tried: I tried to delete the device (3 Xl) several times, wipe data, and cold boot several times, I uninstalled and reinstalled the SDK tools several times. I uninstalled the Android studio itself a couple of times and reinstalled it. Restored the settings to default, installed the SDK tools again. Yet nothing works. SDK tools

I don't think there are any problems with disk space or ram or memory on my computer, because it worked fine until I did a force quit on my emulator. I just don't understand how I can fix this I tried searching or googling for hours and couldn't figure out how to fix this issue.

  • 1
    Running on Mac OS Big Sur 11.3? https://stackoverflow.com/a/67288845/101361 – laalto Apr 27 '21 at 19:44
  • I have a follow-up question on this thread I wasn't able to reply to the answer. I'm new to android development, so I am not sure where exactly I would add entitlements.xml and where on the terminal (which directory) should I be running the command that was provided? And yes, I updated my mac this morning too, so I would assume this is the same issue I have. – pro-Programmer Apr 27 '21 at 20:03
  • Works in any directory, just check that the qemu binary path matches your SDK location. – laalto Apr 27 '21 at 20:08
  • I have been trying to figure out what path I should be replacing this with. /usr/local/bin/qemu-system-x86_64. Is there a way to find out what path I should be replacing this with. Does this path already exist or are you creating this folder/file? – pro-Programmer Apr 27 '21 at 21:13
  • Could be e.g. ~/Library/Android/sdk/emulator/qemu/... and something under there. Depends on your SDK installation. – laalto Apr 27 '21 at 21:17
  • I replaced it with the SDK path...however, it gave me a message : bundle format unrecognized, invalid, or unsuitable. I am not sure what this means ... or if I did anything wrong. I basically created the entitlements.xml file in a random directory then pasted that command by modifying it as follows: codesign -s - --entitlements entitlements.xml --force /Users/ansar/Library/Android/sdk the response I got was : /Users/ansar/Library/Android/sdk: bundle format unrecognized, invalid, or unsuitable – pro-Programmer Apr 27 '21 at 21:21
  • Need to point the codesign to the qemu binary file. On one installation I have it's at ~/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 – laalto Apr 27 '21 at 21:29
  • Is it possible that you can move this conversation to chat, I can't do it since I don't have enough reputation points. I need this to be fixed so badly, and this project would decide If I can graduate or not in 2 weeks. – pro-Programmer Apr 27 '21 at 21:43
  • codesign -s - --entitlements entitlements.xml --force /Users/ansar/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools. See `man xcode-select` for more details. Path above: the codesign_allocate helper tool cannot be found or used – pro-Programmer Apr 27 '21 at 21:46

1 Answers1

0

Maybe you have the Android SDK Build-Tools installed but not the right version. Go to SDK manager -> SDK Tools -> click on Show Package Details (right bottom corner) and then tick the boxes you need.

If that doesn't fix it maybe you can do the same thing under SDK Platforms but then select "Google APIs Intel x86 Atom System Image". After the install, create a new emulator. Don't use the recommended option but click on "X86 Images" and select the image you need. Click next and scroll down a bit. You'll see "Emulated Performance". Now set it to software and finish.

Hope one of this possible solutions will help you.

Milan Dol
  • 3
  • 3