Can't deploy code to RoboRio

Hello Everyone,

I am the lead programmer for my team and we have just finished some basic code to get our robot driving during teleop. However, when I try to deploy the code to the roborio from VS code I get errors saying "RoboRIO image and GradleRIO versions are incompatible. I have reimaged and updated the roborio and even reinstalled the WPILIB. Nothing works. Any help would be much appreciated! Below is the full error message:

Reason: InvalidImageException
Invalid RoboRIO Image Version!
RoboRIO image and GradleRIO versions are incompatible:
Current image version: 2023_v3.1
GradleRIO-compatible image versions: 2022_v3.*
for information about updating WPILib and GradleRIO.
2 other action(s) failed resolution.
1 other action(s) resolved but not connected.
Run with --info for more details

Task :discoverroborio FAILED
Missing Target!
Are you connected to the robot, and is it on?
GradleRIO detected this build failed due to not being able to find “roborio”!
Scroll up in this error log for more information.

FAILURE: Build failed with an exception.

Your code is using a 2022 version of wpilib. You say youve installed the latest version of wpilib, so thats most of it. Make sure you open the 2023 version of vscode then open your project. It should prompt you to import your project which will give you a form to fill out, which will ultimately create a copy of your code in a directory of your choosing but targetting the 2023 version of wpilib. Once you open that new project, you should be able to build/deploy it. You may need to reinstall vendor libraries (ctre phoenix, revlib, navx, etc) before it builds successfully.

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