Just did a fresh Install of Eclipse 3.5 and the Android Platform (SDK's and ADT). I've done this a few times on different machines and so I'm pretty sure I've got everything configured properly.
Tried importing an Android project and received the following error in the console window:
"Android requires .class compatibility set to 5.0. Please fix project properties."
I've never seen this error before. The only thing I can think of is that its talking about the build target? I've got the project build target set to 1.6 (API Level 4), Which is where I want it. Seems silly that they would require me to change to a higher API level...
Anyone else see this error before?
I had to Rebuild all my Projects when I imported from my Windows machine to the Mac. Project => Build Project did the trick.
Just clean the imported project for Project->clean and selecting the project just imported. it Worked for me. hope would work for you too. :)
I believe that Android is talking about the Java bytecode format, which you can set in "Window/Preferences", "Java/Compiler/Compiler Compliance Level".
I resolved it by doing :
Clic on :
At that point JDT's compiler preferences get properly set to 1.6
The error is gone.
I got a new Windows 7 notebook and also had to set compiler comliance level to 1.5. On my former Vista workstation and on my MacBook Pro I never ran into that issue.
Using Eclipse and compiling an Android app after upgrading to JDK1.7+?
Try this...
Right-click on the project name in the package explorer.
Select Java Compiler.
Check off enable project specific settings.
Select Compiler compliance level 1.6
Apply/OK.