javax.annotations cannot find symbol

Answered

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

6
31 comments

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

 

0

Please sign in to leave a comment.