New vscode update messes things up

attempting to upload gives the following errors (theres a lot)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:downloadDepsPreemptively’.

Could not resolve all dependencies for configuration ‘:nativeZip’.
Could not resolve edu.wpi.first.hal:hal-cpp:2019.3.1.
Required by:
project :
No cached version of edu.wpi.first.hal:hal-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.hal:hal-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.hal:hal-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.hal:hal-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.hal:hal-cpp:2019.3.1 available for offline mode.
Could not resolve edu.wpi.first.wpiutil:wpiutil-cpp:2019.3.1.
Required by:
project :
No cached version of edu.wpi.first.wpiutil:wpiutil-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.wpiutil:wpiutil-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.wpiutil:wpiutil-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.wpiutil:wpiutil-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.wpiutil:wpiutil-cpp:2019.3.1 available for offline mode.
Could not resolve edu.wpi.first.ntcore:ntcore-cpp:2019.3.1.
Required by:
project :
No cached version of edu.wpi.first.ntcore:ntcore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.ntcore:ntcore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.ntcore:ntcore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.ntcore:ntcore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.ntcore:ntcore-cpp:2019.3.1 available for offline mode.
Could not resolve edu.wpi.first.cscore:cscore-cpp:2019.3.1.
Required by:
project :
No cached version of edu.wpi.first.cscore:cscore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.cscore:cscore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.cscore:cscore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.cscore:cscore-cpp:2019.3.1 available for offline mode.
No cached version of edu.wpi.first.cscore:cscore-cpp:2019.3.1 available for offline mode.
Could not resolve com.ctre.phoenix:cci:5.14.0.
Required by:
project :
No cached version of com.ctre.phoenix:cci:5.14.0 available for offline mode.
No cached version of com.ctre.phoenix:cci:5.14.0 available for offline mode.
No cached version of com.ctre.phoenix:cci:5.14.0 available for offline mode.
No cached version of com.ctre.phoenix:cci:5.14.0 available for offline mode.
No cached version of com.ctre.phoenix:cci:5.14.0 available for offline mode.
Could not resolve com.revrobotics.frc:SparkMax-driver:1.1.9.
Required by:
project :
No cached version of com.revrobotics.frc:SparkMax-driver:1.1.9 available for offline mode.
No cached version of com.revrobotics.frc:SparkMax-driver:1.1.9 available for offline mode.
No cached version of com.revrobotics.frc:SparkMax-driver:1.1.9 available for offline mode.
No cached version of com.revrobotics.frc:SparkMax-driver:1.1.9 available for offline mode.
No cached version of com.revrobotics.frc:SparkMax-driver:1.1.9 available for offline mode.

Build your project while connected to the internet first. The ‘update’ just changes a configuration line in the build.gradle file in your project folder. The gradle build system then automatically downloads new libraries onto your computer if it detects that you don’t have it, afterwards you don’t need an internet connection.

As a side note, the latest libraries are 2019.3.2, not 2019.3.1

How did you update? This shouldn’t happen if you used the installer and instructions from here as everything is installed locally: http://wpilib.screenstepslive.com/s/currentCS/m/java/l/1027503-installing-c-and-java-development-tools-for-frc

If you did something else to update, then like jdao said, you likely need to be online to do the first build to download all the dependencies.

I updated using “Check for WPILib updates” through the command line, and i’ve already built the code while online, yet it stilll shows the same error. I suspect it has something to do with my versions being 2019.3.2, while gradle or something is expecting 2019.3.1

In the build.gradle file, you can change the top lines to this:

plugins {
    id "java"
    id "edu.wpi.first.GradleRIO" version "2019.3.2"
}

And then rebuild and it should pull the new libraries.

I already have that line

So I’m not really familiar with this particular issue since I use IntelliJ as my IDE instead of VS Code. In VS Code you can try the option WPILIB: Run a gradle command and enter ‘clean’ first before you try to build it, otherwise you may try changing the version back to 2019.3.1 and then reloading the project in VS code to get the FRC VS Code to detect the version difference to update the project. Otherwise, I’d try doing a clean install of the FRC VS Code and retrying this. (Another team I’ve helped had an issue compiling using the normal VS Code and adding the FRC VS Code plugins and downloading the FRC version fixed it for them)

How did you run the build? What did it print?

The wpilib artifacts are 2019.3.1, used by gradleRIO 2019.3.2, so that is expected.

Did you happen to set any offline mode before doing the update? You can check by opening the settings.json file in the .vscode folder. If that has wpilib.offline set to true, change it to false, run a build, then you can change it back to true.

If you select the Build Robot Code task from the command palette you can copy the command line task being run. It will start with gradlew and end with jdk" (note the quotes).

Copy that entire line, click in the Terminal window and hit Enter. Paste the line you copied and remove –offline from it, hit Enter.

You need to be connected to the Internet first, but that should update your library cache and allow you to build offline once again.

ok i found a fix
entering ./gradlew build in terminal fixed it
thx everybody

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