Tuesday, May 11, 2010

Android SDK Error: Unable to resolve target 'android-X'

There are few variants of this error message:
Unable to resolve target 'android-1'
Unable to resolve target 'android-2'
Unable to resolve target 'android-3'
Unable to resolve target 'android-4'
Unable to resolve target 'android-5'
Unable to resolve target 'android-6'
Unable to resolve target 'android-7'
Unable to resolve target 'android-8'
Unable to resolve target 'android-9'
Unable to resolve target 'android-10'
Unable to resolve target 'android-11'
Unable to resolve target 'android-12'
Unable to resolve target 'android-13'
Unable to resolve target 'android-14'
Unable to resolve target 'android-15'
Unable to resolve target 'android-16'
Unable to resolve target 'android-17'
Unable to resolve target 'android-18'
Unable to resolve target 'android-19'
Unable to resolve target 'android-20'
Unable to resolve target 'android-21'

Reason: Could not find the proper Android SDK version. If the android SDK is installed correctly the problem is that the platform SDK requested by the "default.properties" is not installed. For example:
Unable to resolve target 'android-1' - (Android 1.0) change the "default.properties"
Unable to resolve target 'android-2' - (Android 1.1) change the "default.properties"
Unable to resolve target 'android-3' - install SDK Platform Android 1.5
Unable to resolve target 'android-4' - install SDK Platform Android 1.6
Unable to resolve target 'android-5' - install SDK Platform Android 2.0
Unable to resolve target 'android-6' - install SDK Platform Android 2.0.1
Unable to resolve target 'android-7' - install SDK Platform Android 2.1
Unable to resolve target 'android-8' - install SDK Platform Android 2.2
Unable to resolve target 'android-9' - install SDK Platform Android 2.3
Unable to resolve target 'android-10' - install SDK Platform Android 2.3.3
Unable to resolve target 'android-11' - install SDK Platform Android 3.0
Unable to resolve target 'android-12' - install SDK Platform Android 3.1
Unable to resolve target 'android-13' - install SDK Platform Android 3.2
Unable to resolve target 'android-14' - install SDK Platform Android 4.0
Unable to resolve target 'android-15' - install SDK Platform Android 4.0.3
Unable to resolve target 'android-16' - install SDK Platform Android 4.1
Unable to resolve target 'android-17' - install SDK Platform Android 4.2
Unable to resolve target 'android-18' - install SDK Platform Android 4.3
Unable to resolve target 'android-19' - install SDK Platform Android 4.4
Unable to resolve target 'android-20' - (Android 4.4w) change the "default.properties"
Unable to resolve target 'android-21' - install SDK Platform Android 5.0.1

You can do this using the Android SDK Setup utility:
Option 1: Eclipse -
"Windows" \ "Android SDK and AVD Manager" \ "Available packages"

Option 2: Command line - start the "SDK Setup" here (x86):
C:\Program Files\Google\Android SDK\SDK Setup.exe
or here (x64)
C:\Program Files (x86)\Google\Android SDK\SDK Setup.exe

30 comments:

yo B-Rabbit said...

I Checked the android sdk manager then find that Android1.6 with api4,version3.So the problem "Unable to resolve target 'android-4'"that I have means the missing sdk of version3 not 4 right?

bala said...

hi friend i am download one open source project if i run this project its display error 1. Unable to resolve target 'android-5'
how to clear this error i am new for android application can you tell me step by step please....

Unknown said...

Merci, you solved my problem

Joel said...

Very helpful (Y)

Scognito said...

Thank you, it worked!

Anonymous said...

Hi friends
you can resolve this issue by opening default.properties file in your workspace and change target according to your SDK version.

Ref: http://stackoverflow.com/questions/3614190/android-change-sdk-version-in-eclipse-unable-to-resolve-target-android-x

Slodge said...

Thanks - very helpful - was wondering what the problem was!

Unknown said...

Thanks

Rafa M. said...

You can also change the tarjet of your project in Eclipse:

Project < Properties < Resource < Android < In "Project Build Tarject" you can select it. Me for exaple is Android 4.0

aSiDiK said...

saved my FINAL YEAR PROJECT! Thanks man!

Roberto said...
This comment has been removed by the author.
Roberto said...

Thanks from Spain mate. problem solved.

Rushit Vaishnani said...

Go to....
Right Click on project-->properties
-->android--->select google api-->ok

Maksim said...

I tried to install Android-4 SDK packet, but I took the following error:

Preparing to install archives
Downloading SDK Platform Android 1.6, API 4, revision 3
null
Done. Nothing was installed.


I tried to install using admin credentials, but the same error.
What is the problem?

Saif said...

Solved my problem, thanks :)

Lo-Tan said...

Really bala? "Help me step by step please?"

Plenty of information is given in the blog post. Laziness irks me, especially when it's a fellow developer who's obviously too lazy to problem solve something. How do you make it day by day? Programmers are a dime a dozen these days, but way too many programmers just 'use' other programmers to get their work done.

Fedor Steeman said...

Thanks!! I knew the necessary packages were somehow missing, but I did not quite know how to get them. I am happy with the pointer!

Unknown said...

hiiiii
currently i am using sdk 4.2 API level-17 and i have a project which has been made on sdk 4.0 how can i run this project in my AVD and tell me one thing that if i install sdk 4.0 then this projct will work on my current AVD. I am using sytem define AVD 3.2QVGA

Krishna Koneru said...

Very helpful post. Thanks.

Shivam-Z said...

http://Profitified.com/ref.php?page=act/ref&invcod=174952

Shivam-Z said...

http://Profitified.com/ref.php?page=act/ref&invcod=174952

bsq said...

Thank you so much !

Unknown said...

TY

Unknown said...

TY

mediastreet said...
This comment has been removed by the author.
Unknown said...

thanks very helpfull

özer said...

thanks bro.

Anonymous said...

thanks

Unknown said...

-right click on project
-project properties
-select android
-see the checked API version in the table

now check whether it is matching with the android target in the project.properties xml file

if it is not match the API version
save and continue

Unknown said...

-right click on the project
-go to properties
-select android
-see the API version in the tabke which is checked

now in project.properties XML file match target with API version in the table
save and continue