PsiLiteralExpression Symbol Cannot Be Resolved



I'm following the Simple Language development tutorial, and I'm at the section on adding an annotator. It requires the class PsiLiteralExpression, but, I can't seem to get the symbol to resolve. I am importing com.intellij.psi.*, which in theory should contain the PsiLiteralExpression class, but it seems that it does not, in fact contain it. I'm not sure if I just don't have my Platform SDK set up properly, or what, but, I set that up by following the Setting Up a Development Environment page, so I don't think it should have any problems... The problem exists when I open the completed Simple Language Project from the sdk docs repo, as well, so it is not exclusive to the version of the project that I am working through.

Thanks in advance for your help.



If you are using gradle, try to add the following code in build.gradle:

intellij {
plugins 'java'

and in the plugin.xml file, change the depends section to be:



It solved the issue in my case.



Thanks for the suggestion. Unfortunately, I am not using Gradle, and I have already included the proper depends section. in plugin.xml, but the problem still persists...



Go to File > Project structure. Which SDK do you have? I believe you need to have the intellij SDK for this to work.


Please sign in to leave a comment.