Why so red? IntelliJ seems to think every declaration/method cannot be found/resolved

前端 未结 28 1523
予麋鹿
予麋鹿 2020-12-12 11:22

I just installed and re-installed IntelliJ. Every Java file is coming up RED. I checked the JDK; it is at 1.6.##. The maven clean install build worked just fine

28条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 11:55

    Check that you have a proper JVM SDK setting in IntelliJ Properties. If invalidate-cache-and-restart isn't enough, check that your are using the proper JVM SDK, such as Java 1.7.

    Look in: Preferences -> IDE Settings -> Scala -> JVM SDK

    Or right click your project -> Open Module Settings -> Project Settings -> Project -> Project SDK -> (Set to Java 1.7)

    Open Module Settings -> Platform Settings -> SDKs -> (Ensure that there is a Java 1.7, otherwise you'll need to add it)

    If you've made a change, then it's probably best to re-run Invalidate Cache & Restart.

提交回复
热议问题