Hello, I’m trying to import the “util.Color” from “edu.wpi.first.wpilibj” but I get the error “The import edu.wpi.first.wpilibj.util.Color cannot be resolvedJava(268435846)”. The other libraries from “edu.wpi.first.wpilibj” seems to work fine.
Do you get errors in an actual build, or only in the vscode editor (intellisense)?
Looks like your import is correct (barring any typos that didn’t make it into this post at least). What version of WPILib are you using?
there are no typos I’m aware of. I get the errors in the vscode (red underline) and an error when tryingg to deploy the code. I’m using the last years WPILib.
Well there’s your problem. The Color class is new this year, so it won’t exist in last year’s wpilib.
Having said that, last year’s wpilib won’t work with this year’s roborio image (an inspection requirement), so you can’t use it for an actual competition bot without upgrading.
okay then I’ll update then and see what will happen.
I’ve updated to WPILib to the current version but it still gives the same error.
Can you share your code? Preferably a link to github or similar
Nope fixed It was just collidining with another library. Thanks for the help.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.