Intellij Cannot resolve symbol on import

前端 未结 29 1902
耶瑟儿~
耶瑟儿~ 2020-11-30 18:10

This problem happens intermittently for different libraries and different projects. When trying to import a library, the package will be recognized, but the class name can\'

29条回答
  •  时光说笑
    2020-11-30 19:05

    @Anton Dozortsev I was driven crazy by a similar behavior; I ended up re-installing the IDE a bunch of times, only getting past the issue after removing the IDEA app, all caches, preferences, etc.

    I tried all kinds of steps in the interim, (like restarts, invalidations, deleting .idea and *.iml files, and others.)

    Turns out, the problem was due to IntelliJ's idea.max.intellisense.filesize setting. I had set it to 100KB, which was smaller than my dependency's size, leading to IntelliJ showing it as unknown, just like in your screenshot.

    Fix:

    1. Click on Help -> Edit Custom Properties

    2. Set the property to a larger value; the default is 2500KB idea.max.intellisense.filesize=2500

提交回复
热议问题