Home > Software design >  Cannot install Android Emulator via Android Studio in Macbook M1 Pro
Cannot install Android Emulator via Android Studio in Macbook M1 Pro

Time:08-16

I went to "SDK Manager" in my M1 Macbook Pro'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)

Any idea to fix this? I've tried re-installing it many times, but still it's not working.

CodePudding user response:

I am having the same problem. My wild theory is that the installer is looking for the August 3, 2022 build of the emulator but the URL is downloading the July 8, 2022 build of the emulator. The May and July builds have different filename/URLs to download - but the July and August ones appear to have the same filename. This looks like a bug from the Android development team. I found a list of filenames, checksums, and descriptions for these files here: https://mirrors.cloud.tencent.com/AndroidSDK/repository2-3.xml

I think that we are stuck until the Android Studio team fixes this URL to download the August 3 build of the emulator.

Edit: It appears that a workaround is available here to force the use of an older emulator. https://developer.android.com/studio/emulator_archive

CodePudding user response:

Having the exact same problem. My install attempt won't even display:

Failed packages: 
- Android Emulator (emulator)

it's indefinitely stuck at: Downloading https://dl.google.com/android/repository/emulator-darwin_aarch64-8807927.zip

I'm assuming the problem has something to do specifically with the M1 chip. Might be wrong, but wouldn't be surprised.

Edit: Found this link, might help- Android emulator doesn't work on Apple M1 chip

CodePudding user response:

Same problem. I tried reading the source of https://github.com/JetBrains/android/blob/master/android/src/com/android/tools/idea/sdk/StudioDownloader.java, which is where the "could not be finalized from the interim state" error is thrown.

I think this is probably a bad push, or a bad cache somewhere. I'm pretty sure this flow used to work on my M1.

CodePudding user response:

I installed this version of Android Studio. It installed the SDK and then I closed and deleted this one and downloaded the latest version and it works. https://redirector.gvt1.com/edgedl/android/studio/install/4.1.3.0/android-studio-ide-201.7199119-mac.dmg

  • Related