Gradle failed to apply plugin

I am having problems when building in gradle. It says that it failed to apply plugin ‘edu.wpi.first.GradleRIO’.

This is the entire error message:
FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Users\lexmi\Downloads\2022-Rapid-React-talon-test\2022-Rapid-React-talon-test\build.gradle’ line: 5

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

Failed to apply plugin ‘edu.wpi.first.GradleRIO’.
Could not create plugin of type ‘GradleRIOPlugin’.
Could not generate a decorated class for type GradleRIOPlugin.
edu/wpi/first/deployutils/log/ETLogger

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Here is the code we are using:

How did you upgrade your project to 2022? You need to use the project importer in vscode.

Also note you will need to use 2022.3.1 for competition.

we imported the code through the wizard in vscode. it didn’t change anything. we are currently using the 2022.3.1 wpilib version.

Can you upload your entire project to GitHub? Right now the only thing on GitHub is src/ (eg we can’t see the build.gradle file contents).

we don’t exactly know how to use github but we think we put the whole code:

Are you sure you ran the code you imported? The imported code uses GradleRIO 2022.3.1 but your error message above uses 2022.1.1.

There’s still missing files, like the .vscode and .wpilib folders

yes we have, we ran both versions of the code. as for the missing files, github won’t upload them as it says they are hidden.

the imported error code is (which is almost identical):
FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Users\lexmi\Downloads\2022-Rapid-React-talon-test\2022-Rapid-React-talon-test-Imported\build.gradle’ line: 5

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

Failed to apply plugin ‘edu.wpi.first.GradleRIO’.
Could not create plugin of type ‘GradleRIOPlugin’.
Could not generate a decorated class for type GradleRIOPlugin.
edu/wpi/first/deployutils/log/ETLogger

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1s
<-------------> 0% WAITING
The terminal process “cmd.exe /d /c gradlew build -Dorg.gradle.java.home=“C:\Users\Public\wpilib\2022\jdk”” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Can you post a picture of the window from “WPILib: Open Project Information”?

It builds on my computer after copying .vscode and .wpilib from another project and installing the 2022 Phoenix vendordep.

image

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