I went to "SDK Manager" in my MacBook Pro M1‘s Android Studio to install Android Emulator, but I got this error:
Packages to install: - Android Emulator (emulator) Preparing "Install Android Emulator (revision: 31.3.10)". Downloading https://dl.google.com/android/repository/emulator-darwin_aarch64-8807927.zip This download could not be finalized from the interim state. Retrying without caching. Downloading https://dl.google.com/android/repository/emulator-darwin_aarch64-8807927.zip Failed packages: - Android Emulator (emulator)
How can I fix this? I’ve tried reinstalling it many times, but still it’s not working.
Based on the ticket Download of Android Emulator update fails on Mac Mini M1 with both Android Studio and IntelliJ IDEA Ultimate, Google has fixed the issue. The following workaround is no longer required.
To clean up and start over:
Uninstall Android Studio
Remove all existing configuration
rm -rf ~/.android \ ~/Library/Application\ Support/Google/AndroidStudio2021.2 \ ~/Library/Android
Install Android Studio using JetBrains Toolbox.
Redo the startup wizard.
I had to manually install the Android emulator as a workaround. Here are the steps I followed:
In the wizard where it gets stuck to download, hit Cancel and Finish.
Follow the instruction specified here.
Note for steps 5 & 6 – I did not have a
package.xml, so I just created one with the following contents, with version updated to
Restart Android studio.
Voilà! Now you should see Android Emulator 31.3.10 installed.
Answered By – Dinesh