Unable to resolve target 'android-16'

后端 未结 13 1804
广开言路
广开言路 2020-12-01 01:02

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

相关标签:
13条回答
  • 2020-12-01 01:03

    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

    0 讨论(0)
  • 2020-12-01 01:04

    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.

    0 讨论(0)
  • 2020-12-01 01:10

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

    0 讨论(0)
  • 2020-12-01 01:15

    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.

    0 讨论(0)
  • 2020-12-01 01:15

    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).

    0 讨论(0)
  • 2020-12-01 01:16

    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.)

    0 讨论(0)
提交回复
热议问题