Yes, this is common.
In Eclipse, choose Window - Preferences - Java - Compiler.
You need to change JDK Compliance level. Try 1.5. You must do this BEFORE you attempt to import any code.
I've had problems recovering after having tried with the "wrong" compliance level. If it happens to you, try deleting the project by right clicking on it and check the box in the dialog (Delete project contents on disk (cannot be undone). Otherwise you risk getting a ghost project which cannot be deleted nor re-imported. In worst case, try importing (with another JDK dompliance level) to another workspace. You can create new under File - Switch workspace. Eclipse restarts itself when switching.
Oh yes, and with the correct JDK compliance, then you can right click on the project in the project explorer and choose Properties - Android. Then you can check the "Project Build Target", for example "Android 2.2". (It is impossible to make any choices there when the JDK compliance level is wrong). You can manage which project build targets are available with the Android SDK Manager, and I think that part is well documented.
Last edited by Typo; March 12th, 2012 at 05:02 PM..
|