Robot Code Error

I have an Error

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'BaseTalonFXSwerve-main-Imported'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve edu.wpi.first:DeployUtils:2024.1.0.
     Required by:
         project : > edu.wpi.first.GradleRIO:edu.wpi.first.GradleRIO.gradle.plugin:2024.2.1 > edu.wpi.first:GradleRIO:2024.2.1 > edu.wpi.first:native-utils:2024.6.1 > edu.wpi.first:ToolchainPlugin:2024.6.1
      > Could not resolve edu.wpi.first:DeployUtils:2024.1.0.
         > Could not get resource 'https://plugins.gradle.org/m2/edu/wpi/first/DeployUtils/2024.1.0/DeployUtils-2024.1.0.pom'. 
            > Could not HEAD 'https://plugins.gradle.org/m2/edu/wpi/first/DeployUtils/2024.1.0/DeployUtils-2024.1.0.pom'.      
               > Bilinen bĂ·yle bir ana bilgisayar yok (plugins.gradle.org)

* 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.

* Get more help at https://help.gradle.org

Connect to the internet and run a fresh build. This should only be needed once to fetch the missing dependency.

It’s giving me this error now, what should I do?


FAILURE: Build failed with an exception.

* What went wrong:
com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: org/gradle/api/flow/FlowAction
> java.lang.NoClassDefFoundError: org/gradle/api/flow/FlowAction

* 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.

* Get more help at https://help.gradle.org

You need to import your project into the 2024 version of WPILib vscode, not just change the version in build.gradle.

could you say more about what the “out of date” detector does, and what the “importer” does? we’ve had projects where the detector complains but the importer yields an identical project.

The out of date detector should only trigger between updates within a season (e.g. from 2024.1.1 to 2024.2.1), when you install the newer version and open an older project. It should not prompt for updates between seasons (e.g. it should not prompt to upgrade to 2024.1.1 when opening a 2023.4.2 project). It effectively only bumps the version in place in build.gradle, making no other changes.

The importer should be used between seasons. It creates a new project, and copies your source code into it, making some basic textual replacements (e.g. if a class moved between packages).

1 Like

To add on, there are a few reasons for the importer working the way it does. Moving between years is not as simple as just upgrading gradlerio versions. It also involves updating the gradle version, which is a more complicated process. Also some years we change some of the structure of GradleRIO, forcing build.gradle file updates. Doing those on projects teams have potentially changed is an impossible problem. So the solution from our end is to just basically create a new project, and then teams can redo their manual changes themselves.

Ekran görüntüsü 2024-02-03 105659

Lib: Java 2023.1.1

My Roborio version is 2024.2.1

What is the problem?

This year is not 2023, it is 2024. I think it changed a couple weeks ago.

You need to

  1. Download and install WPILib 2024
  2. Open WPILib VSCode 2024
  3. Import your project