Fix "Unable to resolve target ' android-x '" error when importing Android example

Source: Internet
Author: User

Today imported an Android example program, appeared unable to resolve target ' android-2 ' error.

Finally, Google only found that the original is

ADK version :---API level correspondence (note that high versions are not necessarily compatible with lower versions)

android2.3.4---10

android2.3.3---10
android2.3.1---9===gingerbread
android2.2---8===froyo
android2.1---7===eclair
android2.0.1---6===eclair
android2.0---5===eclair
android1.6---4===donut
android1.5---3===cupcak
android1.1---2
android1.0---1

WORKAROUND: 1, modify the project.properties in the target=android-8 (if the android2.2 development of the case)

2. Right-click on the project properties, select Android on the left, and select the specific Android version on the right.


After selecting OK, right-click on the item and select Fix Project Properties under Android tools

3. If there is no default properties, build it yourself and then target=android-10


JDK version :
1.5 subclasses that inherit class are supported with @overwrite overlay method
1.6 Support for implementing subclasses of interfaces with @overwrite
Workaround: Window-->preferences-->java-->compliance-->compiler on the right, select 1.6 or other, click Apply, click OK. (1.6 backwards compatible)


To add additional library support :

First of all to join Android.jar this package, right-click Project Buildpath--add External Archives

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.