Android unable to resolve target 'android-x'

Source: Internet
Author: User

Import an android example todayProgramThe error "unable to resolve target 'android-8'" is returned. At first, I thought it was not a package or phonegap was not configured. But after a long time, I still reported an error. Finally, Google discovered that the original adk version was different.

Adk version: --- API level ing (note that the higher version is not necessarily compatible with the lower version)

Android2.3.4 --- 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

Solution: 1. modify target = Android-8 in project. properties (if android2.2 is developed)

2. Right-click the project to open project properties, select android on the left, and select a specific Android version on the right.
Right-click the project and select fix project properties under Android tools.

3. If no default properties is available, create the properties by yourself, and then target = Android-10

JDK version:
1.5 only child classes that inherit the class can be overwritten with @ Overwrite
1.6 @ Overwrite
Solution: window --> preferences --> JAVA --> compliance --> compiler on the right, select 1.6 or another, click Apply, and click OK. (1.6 downward compatible)
Support for adding additional libraries:

First, add the Android. jar package, right-click the project buildpath,

Java buildpath, select Libraries

Click "addlibrary" in the button on the right"

Select "userlibrary" and click "Next"

Click "userlibrarys ".

On the displayed page, click "new ...".

In the pop-up interface, enter a name and click "OK"

Click "addjars" to select a third-party jar package and click "OK" to complete the operation.

Related Article

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.