简体   繁体   English

Eclipse->新的Android项目始终会编译Java 1.4

[英]Eclipse->New Android Projects always compile java 1.4

Everytime I add/create or copy a Project inside my Eclipse-Workspace it will be recognized as a Java 1.4 Project, which leads to a sum of errors. 每次我在Eclipse工作区中添加/创建或复制一个Project时,它将被识别为Java 1.4 Project,这会导致错误。 I have to fix this myself under properties->java-compiler and check 1.6 there. 我必须在properties-> java-compiler下自己修复此问题,并在那里检查1.6。 So I have a few questions on that: Is it possible to pre-define which compiler Eclipse has to choose? 因此,我对此有一些疑问:是否可以预先定义Eclipse必须选择哪个编译器? Is there a config file telling eclipse which compiler to choose? 是否有一个配置文件告诉eclipse选择哪个编译器?

Check under Window -> Preferences -> Java -> Compiler. 在窗口->首选项-> Java->编译器下检查。 There is "Compiler compliance level", it should be set to your desired level. 有“编译器合规性级别”,应将其设置为所需的级别。 :) :)

If that does not work, go to the "New Java Project" dialog and pres "Configure JREs". 如果这不起作用,请转到“新建Java项目”对话框,然后单击“配置JRE”。 Make sure your desired JRE is selected. 确保已选择所需的JRE。

窗口->首选项-> Java->编译器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM