22

I installed Android Studio 2.2.2 on my system. After when I openend one of the projects which have compileSdkVersion 23, got following error,

>  Error:Failed to find target with hash string 'android-22' in:
> href="install.android.platform">Install missing platform(s) and sync
> project</a>

I know this error means I need to download sdk packages but I'm not able to do so. Also in my SDK Manager I don't see all APIs to install

enter image description here

musica
  • 1,373
  • 3
  • 15
  • 34
  • Try to rebuild project or clean project, and update your SDK – Sampad Nov 04 '16 at 06:29
  • Possible duplicate of [All packages are not available for download error in android](https://stackoverflow.com/questions/38714165/all-packages-are-not-available-for-download-error-in-android) – Shirish Herwade Jul 26 '17 at 06:48

5 Answers5

22

I was facing the same issue. For me, it got resolved by setting proxy settings.

Android Studio > File > Settings >appearance and behavior> System Settings > HTTP Proxy

I would suggest checking any proxy is required to enable internet for your android studio. Hope this will help somebody.

Ebite Zion
  • 340
  • 2
  • 10
4

Open Android SDK Manager

  1. Click on Tools.
  2. Click on Android.
  3. Click on SDK Manager.

Update your SDK's

Then Sync ,Re-Build and Restart Your Project

Sampad
  • 1,645
  • 11
  • 14
2

"Launch Standalone SDK Manager" is not available in newer versions.

Just select "SDK Tools" tab, then "Android SDK Build-Tools and place a check next to 23.0.1, 23.0.2, 23.0.3, etc. and any others you may want to install.

Select Apply and when complete, press Finish.

Rebuild and see if that helps.

Snappy Cracker
  • 1,393
  • 12
  • 14
2

If you were in China, maybe because of the host problem.

I had resolved this problem with 3 steps

the android sdk platform resources are download from host dl.google.com

so first step, get the available ip address for dl.google.com

(1) visit the ping tools

enter image description here

enter image description here

(2) get the 'best' ip address for dl.google.com

according to the pic best one is 203.208.41.73

(3) set the local host for your computer

enter image description here

(4) install sdk platform again

enter image description here

If you were in China hope this trick could help you

Jeffery Ma
  • 3,051
  • 1
  • 23
  • 26
1

You need add check in, open Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools -> Launch Standalone SDK Manager

FIRST SDKPlatform to 23 enter image description here

SECOND Tools to 23 enter image description here

and ever end sync up..

marlonpya
  • 624
  • 7
  • 21