Avd Mac M1

An unofficial community to discuss Apple devices and software, including news, rumors, opinions and analysis pertaining to the company located at. Android Studio fails to build my large Java + C (NDK) app on the M1 - Mac mini. The Java JVM crashes during one of the steps. This is true with both the built-in JVM and the Java 8 on my machine.

  1. Android Studio Apple M1 Emulator
  2. Avd Mac M1 Pro

Yesterday the emulator was working perfectly. The system image was arm64-v8a. I don’t exactly remember the Release name of the working system image but, yesterday there was an update for the ARM 64 system image which I accepted and the release name is “S”.

I can start the emulator from my AVD Manager, the emulator also starts when I press the ‘Run app’ button however, the app isn’t loaded on the emulator and the emulator appears offline if I check through “adb devices” or if I click on “Troubleshoot Device connections” it shows:

“emulator-5554 – Device is currently in the offline state”

I have tried most of the suggestions found on StackOverflow like:

Hello everyone in this article we are going to see how you can setup Android emulator in M1 ARM Chip Mac. Apple recently ditched Intel processors and started making their own processors, which is not. The S API Level M1 Android Emulator is pretty fast. Just like the one we usually run on Intel device machine with Intel® HAXM. And for me the best news is, Chrome is working!! I tried Charles. I followed the steps that this guy talks and had good results: Go to AVD Manager; Click '+ Create Virtual Device' Choose a Device definition (ex. 'Pixel 4a XL') Click 'Next' Click 'Other images' Download 'S' System image; Click 'Next'.

  • adb kill-server, adb start-server

  • Remove and re-create AVD device

  • Invalidate Caches/Restart

  • Enable USB debugging inside the emulator

  • Wipe data and cold boot from AVD manager

    I am using Android Studio 4.1.3

    Build #AI-201.8743.12.41.7199119, built on March 10, 2021Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64VM: OpenJDK 64-Bit Server VM by JetBrains s.r.omacOS 10.16GC: ParNew, ConcurrentMarkSweepMemory: 1981MCores: 8Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=trueNon-Bundled Plugins: org.jetbrains.kotlin

AVD:

Any idea what has gone wrong? Or how to tackle this issue?

Answer

Replace the avd system images you have downloaded with the r02 images. r03 is broken for me but reverting to r02 saved the day!

With the latest android (4.1.3) on macOS, the directory you want to put the unzipped images in is probably something like ~/Library/Android/sdk/system-images/android-S.

For example, the path for the google play image is ~/Library/Android/sdk/system-images/android-S/google_apis_playstore/arm64-v8a

Yesterday the emulator was working perfectly. The system image was arm64-v8a. I don’t exactly remember the Release name of the working system image but, yesterday there was an update for the ARM 64 system image which I accepted and the release name is “S”.

I can start the emulator from my AVD Manager, the emulator also starts when I press the ‘Run app’ button however, the app isn’t loaded on the emulator and the emulator appears offline if I check through “adb devices” or if I click on “Troubleshoot Device connections” it shows:

“emulator-5554 – Device is currently in the offline state”

I have tried most of the suggestions found on StackOverflow like:

  • adb kill-server, adb start-server

  • Remove and re-create AVD device

  • Invalidate Caches/Restart

  • Enable USB debugging inside the emulator

  • Wipe data and cold boot from AVD manager

    I am using Android Studio 4.1.3

    Build #AI-201.8743.12.41.7199119, built on March 10, 2021Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64VM: OpenJDK 64-Bit Server VM by JetBrains s.r.omacOS 10.16GC: ParNew, ConcurrentMarkSweepMemory: 1981MCores: 8Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=trueNon-Bundled Plugins: org.jetbrains.kotlin

AVD:

Any idea what has gone wrong? Or how to tackle this issue?

Android Studio Apple M1 Emulator

Mac

Avd Mac M1 Pro

Answer

Replace the avd system images you have downloaded with the r02 images. r03 is broken for me but reverting to r02 saved the day!

With the latest android (4.1.3) on macOS, the directory you want to put the unzipped images in is probably something like ~/Library/Android/sdk/system-images/android-S.

For example, the path for the google play image is ~/Library/Android/sdk/system-images/android-S/google_apis_playstore/arm64-v8a