javax.annotations cannot find symbol
已回答
All of a sudden, Intellij (version 2018.1.5, Linux) says it cannot find symbol for classes in javax.annotation (e.g. javax.annotation.Nullable). On screen it shows as if it compiles neatly, but when attempting to run a test or to 'Build project' it says: cannot find symbol. The package is definitely on the classpath and everything goes well when I do a mvn build on the command line.
The jar that holds the classes (/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar) is found in my External libraries.
A colleague of mine experiences the same issue (he has got 2018.4 on Windows)
Should I report a bug somewhere?
Thanks for any help,
Steven
请先登录再写评论。
BTW - This is still occurring in 2024. Fortunately, the problem does go away when you clear caches.
IntelliJ IDEA 2024.1.4 (Ultimate Edition) Build #IU-241.18034.62, built on June 20, 2024