20

When I try to run on windows this command :

emulator.exe -avd android13

Where android13 is an arm64 avd I receive the error :

INFO    | Android emulator version 31.3.13.0 (build_id 9189900) (CL:N/A)
emulator: INFO: Found systemPath c:\Users\zeus\AppData\Local\Android\Sdk\system-images\android-33\google_apis\arm64-v8a\
PANIC: Avd's CPU Architecture 'arm64' is not supported by the QEMU2 emulator on x86_64 host.

I'm on windows 10. How can I run an AVD with arm64 cpu architecture?

zeus
  • 12,173
  • 9
  • 63
  • 184

1 Answers1

29

ARM64 emulation on a x86_64 host currently is only possible up to API level 27 Oreo:

#ifdef __x86_64__
  if (sarch == "arm64" && apiLevel >=28) {
      APANIC("Avd's CPU Architecture '%s' is not supported by the QEMU2 emulator on x86_64 host.\n", avdarch);
  }
#endif

You'd need an ARM64 CPU to run android-33:

#if defined(__aarch64__)
  if (sarch != "arm64") {
      APANIC("Avd's CPU Architecture '%s' is not supported by the QEMU2 emulator on aarch64 host.\n", avdarch);
  }
#endif
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • thanks martin, but I build my app with Delphi that produce native assembly :( – zeus Dec 19 '22 at 06:41
  • Using a hardware device might be the most reliable option for latest API on ARM64. MacBook M1 might eventually also be able to run the emulator; that's at least what the source code says. – Martin Zeitler Dec 19 '22 at 23:05
  • thanks martin but do you know with hardware device I can found (except the macbook that is very expensive) to launch the emulator on arm ? – zeus Dec 20 '22 at 11:30
  • 1
    You're not launching anything on ARM, this is x86_64. Consumer grade hardware devices are much cheaper than a MacBook M1/M2; you'll have to invest about 200-300 EUR for that. I don't know why it's disabled for x86_64, but likely there is a god reason for it, which means a custom emulator won't help. – Martin Zeitler Dec 30 '22 at 05:31
  • I have a pretty interesting behaviour. `uname -p` returning `arm` but when I trying to start emu with avd ``` INFO | Android emulator version 31.3.14.0 (build_id 9322596) (CL:N/A) emulator: INFO: Found systemPath /Users/tcagent/Library/Android/sdk/system-images/android-31/google_apis/arm64-v8a/ PANIC: Avd's CPU Architecture 'arm64' is not supported by the QEMU2 emulator on x86_64 host. ``` – Vacxe Apr 24 '23 at 03:48
  • Incredible that Android Studio does not warn you before hand or come with any understandable error when trying to launch Android 33 image! We have to open idea.log to find out AFTER installing an image that doesn't run. – Anders Emil May 19 '23 at 08:59