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