We are trying some issues with updating our 2020 robot to the current version. We tried everything that we would.
The issue is that I’m trying to compile the 2020 robot code for an event, but I’m getting error like ‘an exception error with Gradle RoboRIO version’. Can anyone help me with this?
It’s hard to know for sure without seeing the exact, full text of the error.
Generally, each year, the roboRIO has to be reimaged up to the latest before code can be loaded on. Can you confirm the RIO has been imaged with the appropriate version ('20 or '22) for the version of wpilib you’re building with?
You are attempting to build code with the 2020 WPILib dependencies, and load it onto a RIO that has been imaged with 2022.
Per Bmongar, you will need to perform an update process to align the vsCode development environment & extension, the RIO Image, and the WPILib dependencies.
My team “imported” a few projects and it was easier to create a new 2022 project and copy the old source files into the new project (delete the new files that you don’t need). Add the current vendor libraries and possibly change a couple of lines of code for WPILib moving a few classes. Generally that took about the same amount of time that it took to read this thread.
Keep in mind that the folks trying to help in this thread aren’t physically with you - they haven’t seen all the steps you’ve taken, and don’t know when you’ve changed something or tried an experiment unless you tell them.
Keep in mind too that statements like “Have you tried…” and “X is a problem” aren’t statements against you or your abilities - they’re attempts to get more details and propose experiments for you to run.
Rather than saying “I’ve already done that”, do a more detailed explanation of what you actually did. Screenshots, exact text of error messages, and pushing changes to Github all help tell that story of exactly what has happened.
A couple thousand teams have successfully updated codebases to 2022 over the past year. The process is unlikely to be fundamentally broken. The core goal here is to figure out what about your setup is unique that prevents the process from going the same way it did for others.
How to ask a question is a bit old, remarkably detailed, and occasionally ignores peoples emotions… but overall is a good guide for folks when it comes to seeking help with software-related issues online.