-1

After opening andrioid studio for first use, I see the following: select SDK prompt

d.android.com/sdk however redirects to a different page with downloads without the android sdk. So I am not able to download it.

Trying to install android-sdk with apt (Ubuntu 18.04) results in problems with the android licenses that I can not resolve, so I uninstalled (with --purge) it again.

I have tried re-installing android studio multiple times in different ways.

How can I setup my android-sdk properly?

Anton
  • 1,314
  • 1
  • 12
  • 27

1 Answers1

0

To get the full sdk start out by downloading the command line tools. After extracting this file you are left with a tools folder.

Place the tools folder inside a new folder called cmdline-tools. This is necessary to avoid namespace issues.

In a terminal inside cmdline-tools run the following (replace 27 with the min version you want your app to be compatible with):

./tools/bin/sdkmanager --update
./tools/bin/sdkmanager "platform-tools"
./tools/bin/sdkmanager "platforms;android-27"
./tools/bin/sdkmanager "build-tools;27.0.3"

At the same folder level as cmdline-tools you should now have the folders:

  • build-tools
  • tools
  • platforms
  • emulator
  • licenses
  • patcher

Move all these folders to a folder named Android in your home dir. For the sdk prompt in android studio select this folder.

Anton
  • 1,314
  • 1
  • 12
  • 27