Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio updates taking forever

I'm seeing extremely slow installs of system image updates on my Android Studio 3.0 running on a macOS High Sierra system. What do I mean by "extremely slow"? Every system image update takes the better part of an hour. To my disgust, the latest set of updates (shown here from the component installer log) took over eight hours:

To install:
- Google APIs Intel x86 Atom System Image (system-images;android-24;google_apis;x86)
- Google APIs Intel x86 Atom_64 System Image (system-images;android-25;google_apis;x86_64)
- Google APIs Intel x86 Atom_64 System Image (system-images;android-23;google_apis;x86_64)
- Google APIs ARM 64 v8a System Image (system-images;android-24;google_apis;arm64-v8a)
- Google APIs Intel x86 Atom_64 System Image (system-images;android-22;google_apis;x86_64)
- Google APIs Intel x86 Atom System Image (system-images;android-23;google_apis;x86)
- Google APIs Intel x86 Atom_64 System Image (system-images;android-21;google_apis;x86_64)
- Google APIs ARM EABI v7a System Image (system-images;android-22;google_apis;armeabi-v7a)
- Google Play Intel x86 Atom System Image (system-images;android-24;google_apis_playstore;x86)
- Google APIs ARM EABI v7a System Image (system-images;android-24;google_apis;armeabi-v7a)
- Google APIs Intel x86 Atom System Image (system-images;android-26;google_apis;x86)
- Google APIs Intel x86 Atom System Image (system-images;android-22;google_apis;x86)
- Google APIs Intel x86 Atom System Image (system-images;android-21;google_apis;x86)
- Google APIs Intel x86 Atom System Image (system-images;android-19;google_apis;x86)
- Google APIs Intel x86 Atom_64 System Image (system-images;android-24;google_apis;x86_64)
- Google APIs Intel x86 Atom System Image (system-images;android-25;google_apis;x86)
- Google APIs ARM EABI v7a System Image (system-images;android-23;google_apis;armeabi-v7a)
Preparing "Install Google APIs Intel x86 Atom System Image (revision: 19)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86-24_r19.zip
"Install Google APIs Intel x86 Atom System Image (revision: 19)" ready.
Preparing "Install Google APIs Intel x86 Atom_64 System Image (revision: 10)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/sys-img-4252396-sdk_google_phone_x86_64-sdk_addon-4414732-sdk_google_phone_x86_64-sdk_addon-patch.jar
"Install Google APIs Intel x86 Atom_64 System Image (revision: 10)" ready.

// lots of similar lines deleted

Preparing "Install Google APIs ARM EABI v7a System Image (revision: 25)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/sys-img-4309849-sdk_google_phone_armv7-sdk_addon-4409279-sdk_google_phone_armv7-sdk_addon-patch.jar
"Install Google APIs ARM EABI v7a System Image (revision: 25)" ready.

Up to this point, everything happens fairly quickly. Then the updater starts actually updating things:

Installing Google APIs Intel x86 Atom System Image in /Users/tedhopp/Library/Android/sdk/system-images/android-24/google_apis/x86
"Install Google APIs Intel x86 Atom System Image (revision: 19)" complete.
"Install Google APIs Intel x86 Atom System Image (revision: 19)" finished.
Running patcher...
Patch applied.
Done
"Install Google APIs Intel x86 Atom_64 System Image (revision: 10)" complete.
"Install Google APIs Intel x86 Atom_64 System Image (revision: 10)" finished.
Running patcher...
Patch applied.
Done

// etc.

Each time, after the line Running patcher... appears, the update proceeds quickly through several files until it reaches "system.img". The progress bar seems to freeze there for about half an hour or more. Once that file completes, the rest of each patch proceeds very quickly.

When there are system images to update, I never have emulators or build tasks running when I start the update. For this latest update, I did have two project windows opened.

Is this slow update normal? Is there something I can do to speed it up?

like image 551
Ted Hopp Avatar asked Nov 14 '17 00:11

Ted Hopp


1 Answers

I've the same issue.

As you said, deleting the current SDK version and reinstalling it from scratch is faster (only download time is the variable here).

I've looked for an issue for this and since I didn't find one I decided to create it here: https://issuetracker.google.com/issues/79307669

feel free to star it.

I doubt this is related to the version of Android Studio so I invite you to write in comment of that issue some information on your system:

  • Android Studio version,
  • Java version,
  • OS,
  • CPU,
  • RAM (and how much of it used for Android Studio JVM),
  • Type of Disk Storage (Magnetic / Solid drive)
  • Filesystem

in the hope we find some common variable that can cause the issue.

This is mine: AS 3.2 Canary 13, OS Linux (Ubuntu 64 bit 16.04 LTS), CPU: Intel i7, RAM 16 GB (-Xmx4g), Storage Magnetic Drive (not solid), Filesystem: Ext4

like image 96
Daniele Segato Avatar answered Oct 20 '22 15:10

Daniele Segato