使用基于Maven项目的Jetbrains 11.2项目.然后我需要移动到1.7.我安装了1.7,我更新了我的pom.xml,我可以使用maven重建整个包.
我已经修改了我在Intelli Projects设置中可以看到的有关Java版本的每个设置
但我不能让它编译它抱怨的文件:
Error:javac target release of 1.6 conflicts with source release 1.7
Run Code Online (Sandbox Code Playgroud)
然后我尝试使用相同的代码库,但使用不同的Intellij项目在我的另一台开发机器上,我得到了类似的错误:
Error:javac: source release 1.7 requires target release 1.7
Run Code Online (Sandbox Code Playgroud)
我无法看到任何其他改变,以使这项工作.
这是我的代码:
int hoursFormat = 1, minsFormat = 2, secsFormat = 3;
String timeFormat = String.format("%02d:%02d:%02d",hoursFormat, minsFormat, secsFormat);
Run Code Online (Sandbox Code Playgroud)
这给出了编译错误:
Unresolved compilation problem:
The method format(String, Object[]) in the type String is not applicable for the
arguments (String, int, int, int)
Run Code Online (Sandbox Code Playgroud)
为什么我在这里收到此错误,如何解决?