Error in unedited build.gradle after updating project from 2021 to 2022

Recently my team updated vscode and the project from 2021 to 2022, but I have a strange error that no one else is having.

In build.gradle (which we haven’t edited) there is an error on the space here

plugins {
id “java”
id “edu.wpi.first.GradleRIO” version “2022.2.1”
^

When I hover over it it gives me

The supplied phased action failed with an exception.
A problem occurred configuring root project ‘compbot2022-updated-for-2022’.
Build file ‘C:\Users\Image\Documents\compbot2022_but_better\compbot2022-updated-for-2022\build.gradle’ line: 3
An exception occurred applying plugin request [id: ‘edu.wpi.first.GradleRIO’, version: ‘2022.2.1’]
Failed to apply plugin class ‘edu.wpi.first.deployutils.DeployUtils’.
Could not create plugin of type ‘DeployUtils’.
Could not generate a decorated class for type DeployUtils.
com/jcraft/jsch/JSch
com.jcraft.jsch.JSch

When I try to build, I get

An exception occurred applying plugin request [id: ‘edu.wpi.first.GradleRIO’, version: ‘2022.2.1’]
Failed to apply plugin class ‘edu.wpi.first.deployutils.DeployUtils’.
Could not create plugin of type ‘DeployUtils’.
Could not generate a decorated class for type DeployUtils.
com/jcraft/jsch/JSch

You can’t just upgrade the gradlerio version number from 2021 to 2022. You have to either run through the wpilib new project creator or create a new 2022 project.

My teammate says he ran it through the wpilib import 2020/2021 gradle project.

Ah. I missed 1 part of the error. We saw that happen to one other person. Reboot the computer, and then delete C:/Users/Image/gradle before opening anything else.

Thanks! This worked.

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