vscode-java: Does not resolve to a ICompilationUnit
RedHat Language for Java is just not working No linter, no code suggestions, no “popups” on hovering, anything
I’m able to get the following error:
[Error - 21:08:10] 08-Oct-2018 21:08:10 file:///home/diego/GitHub/MAKEROID/Makeroid/appinventor/components/src/com/google/appinventor/components/runtime/util/crypt/MakeroidAES256.java does not resolve to a ICompilationUnit
It happens when the extension tries to read any file I already tried deleting the extension and installing it again
Environment
- Operating System: Debian 9
- JDK version: 10 (tried as well on 8)
- Visual Studio Code version: 1.28
- Java extension version: Latest
Steps To Reproduce
- Just open any file
Current Result
It should be working
Expected Result
It’s not working
Additional Informations
It was working time ago, but one day it stopped working, I don’t know why
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 8
- Comments: 24 (2 by maintainers)
Make sure to have a
org.eclipse.jdt.core.javanature
in your .project file.I had the same issue with Apache flink -
mvn eclipse:eclipse
did the trick. This also generates the .classpath.Try deleting vscode-java’s working directory and restart VS Code (Next version will provide a command to do it directly from VS Code)
I am still getting this issue even after performing the clean java workspace command in VS Code.
I started seeing the same issue recently as well. Cleaning java language server workspace does not fix for me. However, running
mvn eclipse:eclipse
resolves the problem and that does seem to work for me.But I don’t believe that should actually be required and is kind of a pain to figure it out…
Looks like an Android application. FYI vscode-java doesn’t support Android project development.
@kouritron You can try to remove
from pom.xml