49

I am importing a project. It comes with errors in last activity file and these are the following entries in console:

[2013-04-04 12:00:59 - AndroidFragment] Unable to resolve target 'android-15'
[2013-04-04 12:10:31 - AndroidFragment] Unable to resolve target 'android-15'

I have fixed project setup and select the available target version by clicking on:

Project > Properties > Android > Project Build Target > Version 

But nothing happens.

Lloyd Dominic
  • 778
  • 8
  • 25
Neha Mangla
  • 1,042
  • 3
  • 13
  • 24
  • check you eclipse if you have that target installed – minhaz Apr 04 '13 at 06:46
  • Can you see the Android 2.3.6 or something like in your project.? – Sulabh Gajjar Apr 04 '13 at 06:47
  • 2
    `android-15` is for Android 4.0.3 version. In Eclipse goto Windows-> Preference->Android and check do you have that component, if not, then download it using Android SDK Manager and your problem will be solved. – Lucifer Apr 04 '13 at 06:49
  • Have you referred other questions like http://stackoverflow.com/questions/4942144/errorunable-to-resolve-target-android-2 or http://stackoverflow.com/questions/11278319/importing-project-gave-unable-to-resolve-target-android-7 – MKJParekh Apr 04 '13 at 06:59
  • I was wondering raghu gave out the best answer here... – Thalaivar Apr 04 '13 at 07:06

2 Answers2

142
  1. Right click on your project.
  2. Go to Properties.
  3. Choose Android on the left side.
  4. On the right, you can see a list of Android API versions. Choose the proper version (Android API 15).
  5. Click Apply.

If you don't see the proper version, click on the Window menu, go to Android SDK Manager and download Android API 15 (Android 4.0.3). Repeat the steps above.

In the picture below, you can see API 16; not 15. You can download API 15 using Android SDK Manager. If you already have it, click the check box next to Android 4.0.3, click Apply and then OK.

enter image description here

To download an SDK from the SDK manager in Eclipse, click on the Window menu, Android SDK Manager. You should see the following window. Check Android 4.0.3 which is API 15, and click Install.

enter image description here

Lloyd Dominic
  • 778
  • 8
  • 25
Raghunandan
  • 132,755
  • 26
  • 225
  • 256
  • For some reason, when I select the build target in here (it's downloaded and installed) and click apply, it does not save. – Kevin McCarpenter Apr 09 '14 at 14:44
  • @K.Carpenter it will be downlaoded an i don't know what you mean by save – Raghunandan Apr 09 '14 at 15:37
  • 3
    The problem was ADT ... when I changed the build target and clicked "Apply", it didn't actually apply (when I closed out and reopened the options, nothing was selected). I had to restart eclipse to get it to pick it up. – Kevin McCarpenter Apr 09 '14 at 15:58
  • @Raghunandan. may I ask you to have a look at an android related question here : http://stackoverflow.com/questions/36968503/android-cannot-update-listview-on-changing-an-edittext-value ? – Istiaque Ahmed May 01 '16 at 17:55
  • Thanks @Raghunandan, your solution perfectly worked for me. Brilliant! – Arun Prasad Jul 10 '18 at 04:44
0

Update

1. Open Sdk Manager from Tools > Sdk Manager

screenshot sdkmanager 1

screenshot sdkmanager 2

2. Click on sdk which you want install, then click OK.

screenshot sdkmanager 3

Community
  • 1
  • 1
Khemraj Sharma
  • 57,232
  • 27
  • 203
  • 212