An error occurred while trying to compute required packages.

Published on Author Code Father

An error occurred while trying to compute required packages: Install the latest Android Studio on a MacBook pro 2015, am getting the following error ‘An error occurred while trying to compute required packages.’

Solution 1: There’s a manual workaround! As per post http://stackoverflow.com/a/42733510/7694425 :

  1. Download the command line tools, place them in the SDK folder (e.g., on mac: /Users/user/Library/Android/sdk), and then add the bin folder to the PATH.
  2. Install the latest platform: in a terminal, execute sdkmanager “platforms;android-25”
  3. Open Android Studio, and go to the SDK Manager (Appearance and Behavior > System Settings > Android SDK)
  4. Click on “Edit”, and then select the sdk folder. Then “Next” > “Next” > “Finish”.

Still, it doesn’t resolve the missing emulator package therefore the Android SDK tools can’t be updated since it’s a dependency. But Android studio works and you can download other packages. Looking forward to a better solution. Solution 2: Solution to emulator package issue! After digging in the repo’s XML for a while I’ve spotted the issue. It turns out that the “emulator” package is only in channel 3 (canary) while the “tools” package is in channel 0 (stable) but depends on “emulator”. The solution is to force the manager to download the “emulator” package from channel 3:

./sdkmanager --channel=3 emulator

Problem solved!

Comments

comments