[Android] Eclipse: Android requires .class compatibility set …to 5.0

Error message : Android requires .class compatibility set to 5.0. Please fix project properties.

– go to “project -> property -> Java Compiler ->”
– Set “Compiler compliance level” to 1.5. And push “Apply” button.

Now it is resolved.

Interesting thing : Once this issue is resolved by changing “Compiler compliance”, even if it we restore this value back to 1.6, this error isn’t reproduced. I don’t have any idea about the reason.

[Java][Tips] Compile…

Java also uses compiler. So, if we meet with compile error, we need to check compile option.

Error : “Access restriction : the field …” [in Eclipse]

‘Project’ -> ‘Properties’ -> ‘Java Compiler’ -> ‘Errors/Warnings’ -> ‘Deprecated and restricted API’ -> Forbidden reference (access rule) -> change from ‘Error’ to ‘Warning’.
=> We can make compile success. But, please keep it mind… using forbidden reference is not recommended!!

Using external Jar [in Eclipse]

Right click on Project -> Properties -> select ‘Java Build Path’ -> select ‘Libraries’ tab -> select ‘Add External JARs’ button…