Error with the recent gradle version update

I just went through and imported a 2021 project into 2022, and when I try to build I get this error:

  • Where:
    Build file ‘C:\Users\Eliza\OneDrive\Desktop\2022 Robot\frc-2022\build.gradle’ line: 3

  • What went wrong:
    An exception occurred applying plugin request [id: ‘edu.wpi.first.GradleRIO’, version: ‘2022.2.1’]

Failed to apply plugin [class ‘edu.wpi.first.deployutils.deploy.DeployPlugin’]
Could not create an instance of type edu.wpi.first.deployutils.deploy.DeployExtension.
‘org.gradle.api.ExtensiblePolymorphicDomainObjectContainer org.gradle.api.model.ObjectFactory.polymorphicDomainObjectContainer(java.lang.Class)’

When hovering over the line where the error is I get this:

Could not run phased build action using connection to Gradle distribution ‘https://services.gradle.org/distributions/gradle-6.0.1-bin.zip’.
Build file ‘C:\Users\Eliza\OneDrive\Desktop\2022 Robot\frc-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.deploy.DeployPlugin’]
Could not create an instance of type edu.wpi.first.deployutils.deploy.DeployExtension.
'org.gradle.api.ExtensiblePolymorphicDomainObjectContainer org.gradle.api.model.ObjectFactory.polymorphicDomainObjectContainer(java.lang.Class)'Java(0)

1 Like

How did you do the import? You should use the project importer (Importing a Gradle Project — FIRST Robotics Competition documentation) to create a new 2022 project from your 2021 project. You can’t just edit the version number in build.gradle.

That seems to have worked, thank you!

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