Unable to resolve target 'android-16'

AndroidAndroid Sdk-2.3

Android Problem Overview


I am using Android 4.2.2. After installing the latest SDK, when I open the eclipse I could see all the projects having the problem during the build. Following is the error i get. Please let me know how to resolve this?

Unable to resolve target 'android-16'

Android Solutions


Solution 1 - Android

I have had the same problem, after an update I got a similar error.

It can be fixed to manually edit the project.properties file and update the android-16 part to the latest one you have installed. In your current case that is android-17.

I guess it can be configured using Android ADT as well, but I could not figure it out and this was quicker

Furthermore, you have to update your manifest as well, make sure you have android:targetSdkVersion set to 17.

Solution 2 - Android

If you're using Eclipse, try changing the target build to something higher than API 17 (Right click -> Properties -> Android -> Project Build Target).

If that removes the error, just change the target build back to API 17 afterwards.

I had this issue when importing android-support-v7-appcompat, and changing the target builds back and forth fixed my problem.

Solution 3 - Android

Worth noting:

My target in project.properties appeared to be set to target=Google Inc.:Google APIs:18. However, it seems that it was set somewhere else to 16. I had to change to target=Google Inc.:Google APIs:16, save, then save it back to 18, and then it worked.

Solution 4 - Android

From the Android SDK Manager, install Android SDK Tools for API version 16.

Solution 5 - Android

Sometimes this happens even if the Project Properties and android:targetSdkVersion (in AndroidManifest.xml) are both of the same current SDK version.

If everything is current and matches, try restarting Eclipse. (This does actually work sometimes.)

Solution 6 - Android

To resolve the problem of "Unable to resolve target 'android-16'" set the targetSDKversion for library project for example "android-support-v7-appcompat".

  1. Expand the library project
  2. Open manifest file from the library (not the one in your application)
  3. Under the tag specify the "Target SDK version" to version of SDK installed (example to 18)
  4. Rebuild the library and application ( or restart Eclipse)

That should solve it.

enter image description here

Solution 7 - Android

Also worth noting - Under Ubuntu 12.04, I installed the Android SDK Tools for API version 16, exited and restarted Eclipse and it resolved the issue without changing the target to version 16 and back to 18

Solution 8 - Android

Checked both projects project.properties files and they had version 18 as target, version 16 nowhere to be found. Restarting Eclipse somehow solved the issue.

Solution 9 - Android

Unable to resolve target 'android-16'

Make sure which version your are using and set that version in the mentioned files

To solve this problem we need to change 3 files as follows.

project.properties (target=android-18)

AndroidManifest.xml (android:targetSdkVersion="18")

\bin\AndroidManifest.xml (android:targetSdkVersion="18")

As mentioned above the 3 files has the same version number.

Solution 10 - Android

In eclipse I did all the above and the error did not go away.

Then I simply RESTARTED eclipse and that solved it ;)

So, do the above and then restart eclipse!

Solution 11 - Android

Go to project.properties in your project folder and change android:targetSdkVersion or target tag.

For example, if project.properties file contains android:targetSdkVersion=16 or target=android-16, change it to one of the targets which you have installed (you could check the installed target from Android SDK manager).

Solution 12 - Android

Set your proxy settings. sdk manager->options. then you can install the API you want. it worked for me.

Solution 13 - Android

Right click on Project. Go to Properties. Choose Android on the left site. On the right a you can see list of android API versions. Choose the proper version (android API 16). Click apply.

If you do not see the proper version go to windows. go to Android SDK Manager and download the android API 16 (Android 4.1.2). Repeat the steps as above.

In the below picture you can see API 16.If not found there, you can download API 16 using android sdk manager. If you already have click the check box next to android 4.1.2, click apply and then OK.

enter image description here

To download sdk form the sdk manager in eclipse go to windows, Android SDK Manager. You should see the following window and check android 4.1.2 which API 16 and click install.The below image is an example for API-15(you have to do it for API-16) enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1822729View Question on Stackoverflow
Solution 1 - AndroidVegerView Answer on Stackoverflow
Solution 2 - Androiduser2651262View Answer on Stackoverflow
Solution 3 - AndroidGLeeView Answer on Stackoverflow
Solution 4 - AndroidW.K.SView Answer on Stackoverflow
Solution 5 - AndroidOld McStopherView Answer on Stackoverflow
Solution 6 - AndroiddeveloperView Answer on Stackoverflow
Solution 7 - Androiduser76945View Answer on Stackoverflow
Solution 8 - AndroidjarosView Answer on Stackoverflow
Solution 9 - AndroidsrinivasuluView Answer on Stackoverflow
Solution 10 - Androiduser3154700View Answer on Stackoverflow
Solution 11 - AndroidRaghav JoshiView Answer on Stackoverflow
Solution 12 - AndroidAnsuView Answer on Stackoverflow
Solution 13 - AndroidZar E AhmerView Answer on Stackoverflow