Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead

时间:2024-12-24 08:04:43

Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead

在解决问题Underscores can only be used with source level 1.7 or greater时,将compiler compliance level改为1.7后遇到此错误。

网上解决办法为http://www.cnblogs.com/henryxu/archive/2012/08/07/2626964.html

由于网上的方法只能针对单个项目有效,我的修改办法为:Window->Preferences->Java->Compiler将compiler compliance level改为1.6,这样就能解决问题