Visual Studio: Android SDK Setup (API Level 19 and 21,22,23)

7k views Asked by At

I have this problem with the setup of Android SDK in Virtual Studio Community 2015. Whenever I try to install or repair VS, I always get problems with the setup of API Level 19 and 21,21 and 23. It always says that the packages were not downloaded and I should check my internet connection. However, my internet connection is working perfectly. I have seen many other users having similar problems, but none of the proposed fixes work for me. I have reinstalled VS twice and repaired it like 3 or 4 times. I checked my Java version and my proxy settings or tried installing them via the Android SDK Manager/alongside Android Studio. So far without any luck. I hope I have not overseen any fixes.

Unfortunately, the log is very long, so I can´t post it here (if you have any suggestions where I can post it, please tell me!). In the links you will find two screenshots of the error message I get.

enter image description here enter image description here

Can you help me?

4

There are 4 answers

0
Sara Liu - MSFT On

Refer to the error message, you can have a try with the following methods:

  1. Open Android SDK Manager and click Tools-Options… and check the option “Force https://... Sources to be fetched using https://...” and try to download those android SDK packages again. If you already tried this before, you can ignore it.

  2. Check this blog: Visual Studio 2015 install failures (Android SDK Setup) behind a Proxy and follow the steps as below to fix it:

    • BEFORE installing Visual Studio, create a file at this location: %USERPROFILE%.android\androidtool.cfg

    • In the androidtool.cfg file that you just created, place those contents that you can find from the blog. Make sure to update “http.proxyPort” and “http.proxyHost” in the file!

    • Install Visual Studio normally

  3. Have a look at this similar issue: Visual Studio 2015 setup issue with Android SDK – hack it!, if you found the same root cause: all google repositories don’t have this package anymore on your side, you can try to create your own repository contains this missing package and let Visual Studio setup “think” he download the package and unzip it successfully.

BTW, the installation log file can upload to https://onedrive.live.com/ and share the link here.

0
Yukihime On

I was able to solved the problem above using the suggestion and comment of @Richard_Norton and @bugzapper from, https://social.msdn.microsoft.com/Forums/sqlserver/en-US/780c0b11-41da-4935-9ae5-dadf38292b51/android-sdk-setup-api-not-installed?forum=vssetup .

  1. I uninstall the older version of Java SE Development Kit which is not Version 8.
  2. I download and install the Java SE Development Kit Version 8 which you can get in here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html .
  3. Then after that i modify Visual Studio 2015 to Install Android SDK Setup (API Level 19 and 21), and 23.

I Hope, this answer can help future someone who is encountering this kind of problem.

0
daveheee On

All I did was install Java SE Development Kit 8u151 from Oracle (Apparently VS 2015 uses Java 7 instead of 8) and then run VS 2015 as administrator and modify. The third party SDK's (19, 21, 23 & 22) were available and all installed correctly. Wish I had of known this before multiple installs and eventually a reinstall of my OS ...suppose I could have done with a clean slate though.

0
Gaurav Jogdand On

Just start the SDK Manager from Visual Studio's menu (Tools/Android/Android SDK Manager...) and select the desired API level you do want and download them! Anyhow, check with the SDK Manager, this is THE tool to get the Android SDK and at times you will need to update stuff through it!