com.revrobotics.ColorSensorV3 not resolved

We have been trying to code the color sensor to our 2019 robot and the import com.revrobotics.ColorSensorV3 cannot be resolved.

We have installed the latest WPILIB, imported the vendor files, etc, but nothing seems to work. Is there something I’m missing?

I’m not the programming lead on our team, but he can’t seems to figure it out either :sweat:

Can someone please suggest a solution? Anything helps:)

Try to run gradlew downloadAll in CMD, then build your code.

after some patient waiting, it seems to have resolved, but I’ll only know for sure once we test it on the teams pc… That will be the next step though, thank you!

1 Like

I’m also having this issue. I’ve tried installing the color sensor libraries offline and online using the .json, and both times, VSCode recognizes the libraries as operational. I’ve also run .\gradlew build and .\gradlew downloadAll. Here’s my code.

I can’t upload more than one image right now, but trust me that my vendordeps tab has REVColorSensorV3.json. It’s early in the season, but it would be nice to be able to practice with color sensing :pensive:

It is possible that although you have the .json file in your vendordeps tab that the folders from the JDK did not get copied into the maven folder in C:\Users\Public\wpilib\2020. If you go to the maven folder, you should expect to see something like this:
If not, copy the folders into the maven folder, starting at the revrobotics folder (or at the ColorSensor folders if you already have the revrobotics folder there like I do). I discussed this here about the CTRE Phoenix library if that helps at all. Otherwise, sometimes a simple restart of the computer magically makes these kinds of things go away. Hope this helps!

That was it. Thank you!!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.