本文介绍了指定的编译器兼容性为1.6,但使用的是JRE 1.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的日食报告了这样的警告:"指定的编译器遵从性为1.6,但使用的是JRE 1.8".
My eclipse reported the warning that "The compiler compliance specified is 1.6 but a JRE 1.8 is used".
我已经使用 Java1.8构建了HelloWorld Android应用程序
,但是,我得到了警告,并且无法构建我的项目.我试图将编译器符合性设置为java1.8.但是我又遇到了一个错误
I have built my HelloWorld Android application using Java1.8,
however, I got that warning and I cannot build up my project. I have tried to set the compiler compliance to java1.8. But I got another error that
.我不知道如何解决此问题?
.I don't know how to fix this problem?
推荐答案
可能的解决方案:
- 右键单击您的项目,然后选择
"Android工具->修复项目属性"
.(如果这不起作用,请尝试以下选项) - 右键单击您的项目,然后选择
属性-> Java编译器"
,选中启用项目特定设置" 并选择从编译器符合性设置" 选择框中选择1.5或1.6. - 在
Window->下偏好设置->Java->编译器
,设置编译器达标级别为1.5或1.6.
- Right-click on your project and select
"Android Tools -> Fix Project Properties"
. (if this doesn't work, try the following option) - Right-click on your project and select
"Properties -> Java Compiler"
, check "Enable project specific settings" and select 1.5 or 1.6 from the "Compiler compliance settings" select box. - Under
Window -> Preferences -> Java -> Compiler
, set Compilercompliance level to 1.5 or 1.6.
这篇关于指定的编译器兼容性为1.6,但使用的是JRE 1.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!