Try cleaning your project by going to the following menu item:

Project > Clean...

If that doesn't work, try removing the jars from the build path and adding them again.

Answer from dogbane on Stack Overflow
🌐
GitHub
github.com › redhat-developer › vscode-java › issues › 366
The Import Cannot Be Resolved, IntelliJ and VS Code · Issue #366 · redhat-developer/vscode-java
November 14, 2017 - I'm getting an issue The import com.[company name].taskservice cannot be resolved on a project. I was getting this issue first and then I ran a mvn idea:idea and it resolved the dependencies. I...
Author   redhat-developer
Discussions

How to fix “import could not be resolved” errors in python?
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: Limiting your involvement with Reddit, or Temporarily refraining from using Reddit Cancelling your subscription of Reddit Premium as a way to voice your protest. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/learnprogramming
6
6
July 10, 2023
Lots of 'The import cannot be resolved' in Maven project
Issue Type: Bug I have a Maven project with some dependencies. Sometimes VSC looses track of these dependencies and can no longer identify the packages in them. Either when opening the workspace or later on. When I open the class that ha... More on github.com
🌐 github.com
11
July 9, 2021
Java import cannot be resolved error, libraries wont install automatically
When I try to import a library I keep getting an import cannot be resolved error. I fixed it by pasting the vendordeps of an older project that already has most of the libraries imported into this new one. But whenever I want to import anything else that wasn’t imported in the older project ... More on chiefdelphi.com
🌐 chiefdelphi.com
0
0
June 6, 2024
Imports cannot be resolved no matter what I do

Are you sure you haven't accidentally set VS Code to use a wrong virtual environment by accident?

More on reddit.com
🌐 r/learnpython
8
0
June 11, 2023
🌐
Chief Delphi
chiefdelphi.com › technical › java
Import cannot be resolved - Java - Chief Delphi
April 3, 2022 - I recently pulled the latest version of my team’s robot from Github. Since the last time I pulled into my workspace the software team added PhotonVision. After pulling the latest version I can build the software without a problem, but Intellicode (I think it is intellicode) says that the it cannot resolve the import: import org.photonvision.PhotonCamera; or any other import for org.photonvision.
🌐
Reddit
reddit.com › r/learnprogramming › how to fix “import could not be resolved” errors in python?
r/learnprogramming on Reddit: How to fix “import could not be resolved” errors in python?
July 10, 2023 -

I get this error quite a bit when importing new packages. Basically, I import a package using pip. Everything goes well. Then I go to actually import it into my package, and then I get a “import could not be resolved” error.

It’s quite frustrating cause I want to use the package, but then I just can’t cause of this stupid bug, which has no solutions.

Does anyone have a fix for these problems? I can’t even understand why the import cannot be resolved.

And yes, I have made sure I am importing stuff in correctly as well, and that the spelling is correct.

🌐
W3Docs
w3docs.com › java
Eclipse error: "The import XXX cannot be resolved" | W3Docs
If you get the error "The import XXX cannot be resolved" in Eclipse, it means that the class or package that you are trying to import cannot be found in the classpath of your project.
🌐
Coderanch
coderanch.com › t › 743787 › eclipse › ide › imports-resolved
imports can not be resolved (Eclipse forum at Coderanch)
June 30, 2021 - If the imports are not resolved then they aren't in the build path. Which suggests they aren't in those jars, provided the jars are actually in the build path. I don't suppose you've looked into the jars to see if they are there or not? ... Yeah. When I asked where you got the deependencies ...
Find elsewhere
🌐
Eclipse
bugs.eclipse.org › bugs › show_bug.cgi
131760 – import cannot be resolved, but package and class exists
Bugzilla – Bug 131760 import cannot be resolved, but package and class exists Last modified: 2009-08-30 02:07:55 EDT ... This site is maintained for archival purposes only. Eclipse projects have transitioned to GitHub and Eclipse GitLab. Use the Projects search tool to locate your project and access its latest code and issue tracker.
🌐
GitHub
github.com › microsoft › vscode-java-pack › issues › 685
Lots of 'The import cannot be resolved' in Maven project · Issue #685 · microsoft/vscode-java-pack
July 9, 2021 - I have a Maven project with some dependencies. Sometimes VSC looses track of these dependencies and can no longer identify the packages in them. Either when opening the workspace or later on. When I open the class that have those imports, VSC is able to resolve all. Some screenshots to show this behavior.
Author   microsoft
🌐
Codemia
codemia.io › home › knowledge hub › eclipse error the import xxx cannot be resolved
Eclipse error The import XXX cannot be resolved | Codemia
July 31, 2025 - If the build path does not correctly point to the necessary libraries or the JRE System Library is misconfigured, imports can fail to resolve. ... Sometimes, this error indicates that the project settings such as .classpath, .project, or settings in MANIFEST.MF are improperly configured.
🌐
Chief Delphi
chiefdelphi.com › technical › programming
Java import cannot be resolved error, libraries wont install automatically - Programming - Chief Delphi
June 6, 2024 - When I try to import a library I keep getting an import cannot be resolved error. I fixed it by pasting the vendordeps of an older project that already has most of the libraries imported into this new one. But whenever I want to import anything else that wasn’t imported in the older project ...
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360003437020-Intellij-IDEA-cannot-resolve-any-import-statement
Intellij IDEA cannot resolve any import statement – IDEs Support (IntelliJ Platform) | JetBrains
April 8, 2019 - I can build successfully, SDK set up, I just can't resolve the imports. ... Have you tried to run "File | Invalidate Caches"? Is it reproducible with new sample project? Please try to temporarily disable "Kotlin" plugin. ... Was this issue ever resolved? I am having the same problem and have tried all suggested solutions above with no luck. ... Thanks for your response. I had tried 'Reimport' previously with no success. I managed to resolve the issue, so I am posting my solution here so others may benefit from it in future.
🌐
Reddit
reddit.com › r/learnpython › imports cannot be resolved no matter what i do
r/learnpython on Reddit: Imports cannot be resolved no matter what I do
June 11, 2023 -

I am using Selenium in my project on VSCode and the code runs fine, but for some reason, Im seeing a squiggly yellow line underneath all the imports. When I hover over, it says this:Import "selenium" could not be resolved Pylance

Because of this, the intellisense is not helping me out when using selenium functions so I'm making silly mistakes like missing a capital letter, and such.

I have tried to change the selected interpreter to the one in my virtual environment, didn't work. I have tried closing VSCode and opening it up again, didn't work. Anyone have some idea on what could be the issue?

🌐
Onenetwork
community.onenetwork.com › sdk-forum › eclipse-studio-import-cannot-be-resolved-classpath-jars-are-missing
Eclipse/Studio - Import cannot be resolved / classpath jars ...
@scoopman Make sure you also imported the install-staging project, otherwise these 3p jars will not be accessible in studio
🌐
Kodezi
blog.kodezi.com › how-to-fix-the-pyright-import-could-not-be-resolved-error-a-step-by-step-guide
How to Fix the Pyright Import Could Not Be Resolved Error: A Step-by-Step Guide
August 13, 2025 - What does the error indicating that the pyright import could not be resolved mean? This error occurs when the tool cannot find a module or package specified in your import statement.
🌐
Chief Delphi
chiefdelphi.com › technical › java
Error "The import com.ctre cannot be resolved" - Java - Chief Delphi
January 8, 2020 - I’m new to command based programming and to coding talons, and we just can’t figure out why this one error keeps occurring. We’ve followed the steps for talon and phoenix installation and added vendor libraries but it ju…
🌐
Team Treehouse
teamtreehouse.com › community › im-having-a-problem-where-intellij-cannot-resolve-imports-even-though-the-libraries-are-added-to-the-project-thanks
I'm having a problem where IntelliJ cannot resolve imports even though the libraries are added to the project. Thanks. (Example) | Treehouse Community
September 1, 2016 - At last posting a screenshot here: well post it on the web somewhere, and share a link here, so that anyone can take a look could be one more option... ... The project was downloaded from GitHub and I wasn't able to resolve the problem with IntelliJ so I created a new project and copy the content of the downloaded project into it. Java Web Development Techdegree Graduate 22,175 Points ... Let me tell you how I do it with project from GitHub, when for example, I want to import project, let it be "Giflib from Spring Basics Course" here at Treehouse:
🌐
Coderanch
coderanch.com › t › 471665 › java › import-resolved
The import cannot be resolved (Java in General forum at Coderanch)
The short explanation is "because classes that are not in packages don't work as JSP beans (and in some other contexts)", the longer explanations have to do with code maintenance reasons (like polluting the global namespace) and some arcane JVM internals. ... You cannot import classes that ...
🌐
Eclipse
genuitec.com › home › topics › archived forums › myeclipse archived › bugs › the import xxxx cannot be resolved
The import XXXX cannot be resolved - Genuitec
February 5, 2009 - I get this message frequently when I make and save a change to a class. I can fix it by modifying the build path. I exclude/include a document directory. This causes the project to rebuild and the error goes away. This may also be related to an issue where it cannot find my web.xml.
🌐
Google Groups
groups.google.com › g › idempiere › c › 0Nh6LdIppD4
The import cannot be resolved
This might be a problem. Is MStorage a custom model from your plugin? Does it come from another model? If so how did you generate it? Did you use a componentdefinition (and a java class) to create a model factory? I don't know how RUN_ImportIdempiere works but i usually import the database dump and apply the migrations scripts by myself with these commands:
🌐
Reddit
reddit.com › r/eclipse › import cannot be resolved of java.util.random
r/eclipse on Reddit: Import cannot be resolved of java.util.Random
November 17, 2022 -

Heya,

Very new to Java programming, so was testing out a bunch of stuff (thanks to the official docs and yt videos that *may* be outdated as they were posted about 2 to 3 years ago.

I was trying to use the import java.util.Random;to no avail; it's up there in the JRE as a .class in the Package Explorer (under JRE System Library [jdk-19] > java.base > java.util > Random.class ; I suppose that's the correct path) ; also tried the ava.util.random.*;as that seems to be the suggested one by Eclipse.

Installed both 17 & 19 jdk, this is what it looks like on my end. I have been looking around the internet for an hour now without any answer to this problem. Tried Project > Clean...; didn't help - changed the library from 19 to 17, same issue.

Thanks for any answer that could help!