IntelliJ IDEA “cannot resolve symbol” and “cannot resolve method”

后端 未结 4 946
灰色年华
灰色年华 2020-12-08 12:50

What are common causes for IntelliJ IDEA not being able to resolve built-in JVM types and methods? For example, when I mouse over String the tooltip says \"Cann

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 13:36

    First check if you have configured JDK correctly:

    • Go to File->Project Structure -> SDKs
    • your JDK home path should be something like this: /Library/Java/JavaVirtualMachine/jdk.1.7.0_79.jdk/Contents/Home
    • Hit Apply and then OK

    Secondly check if you have provided in path in Library's section

    • Go to File->Project Structure -> Libraries
    • Hit the + button
    • Add the path to your src folder
    • Hit Apply and then OK

    This should fix the problem

提交回复
热议问题