版本:IntelliJ IDEA 2016.2.4
JDK: 1.7->1.8
我在项目的进行中把jdk从1.7改为1.8了,之后出现的问题是Usage of API documented as @since 1.6+ …
解决方法为,把Intellij中有关jdk版本,bytecode版本和language level都改为1.8(8),步骤:
IntelliJ IDEA -> Preferences -> Build, Execution, Deployment -> Complier -> Java Complier -> Project bytecode version 和 Per-module bytecode version 中的 Target bytecode version 都改为1.8,apply
File -> Project Structure -> Modules -> Source -> Language Level 改为 8,apply
File -> Project Structure -> SDKs 用”+”添加”JDK” 1.8 ,设置name为1.8, JDK Home Path为jdk文件下Contents -> Home。添加完成后到File -> Project Structure -> Project 设置Project SDK为新添加的1.8,apply