今天将ADT更新到最新的12.0版本,重新导入以前的工程,没想到竟然报如下错误:
Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Please use Android Tools > Fix Project Properties.
按提示在工程文件上 右键 -> Android Tools -> Fix Project Properties ,无效。
手动打开Project Properties -> java Compiler -> 选上Enable project specific settings -> 再选择 Compiler Compliance Leave(选择任意一个非默认的值) -> OK
重复第2步,将Compiler Compliance Leave选为正确的值,OK。
Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Please use Android Tools > Fix Project Properties.
按提示在工程文件上 右键 -> Android Tools -> Fix Project Properties ,无效。
手动打开Project Properties -> java Compiler -> 选上Enable project specific settings -> 再选择 Compiler Compliance Leave(选择任意一个非默认的值) -> OK
重复第2步,将Compiler Compliance Leave选为正确的值,OK。
本文详细介绍了在将ADT更新到最新版本后,遇到Android工程报错'Androidrequirescompilercompliancelevel5.0or6.0.Found'1.4'instead'的解决方案,包括如何正确使用AndroidTools>FixProjectProperties功能,以及手动调整ProjectProperties中的Java Compiler设置,确保项目编译级别符合需求。
3200

被折叠的 条评论
为什么被折叠?



