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

时间:2023-03-08 17:53:03
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead

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,这样就能解决问题