导入 java.time 无法解析
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34579326/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
the import java.time cannot be resolved
提问by mazouu rahim
Hello I am using eclipse Mars and I have the following message error generated :
您好,我正在使用 eclipse Mars,并且生成了以下消息错误:
Caused by: java.lang.Error: Unresolved compilation problems
The import java.time cannot be resolved
LocalDateTime cannot be resolved to a type
LocalDateTime cannot be resolved
I just would like to solve the problem I think I should use JDK 8 but i don't know to use it in eclipse.
我只是想解决我认为应该使用 JDK 8 但我不知道在 eclipse 中使用它的问题。
回答by Abdelhak
Make sure Build automatically
is checked and Clean. If it doesn't work, restart Eclipse and do again.
确保automatically
选中并清理构建。如果它不起作用,请重新启动 Eclipse 并再次执行。