A build error I ave no clue as to how to fix

  • What went wrong:
    A problem occurred configuring root project ‘Thing’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve edu.wpi.first:native-utils:2022.8.2.
Required by:
project : > edu.wpi.first.GradleRIO:edu.wpi.first.GradleRIO.gradle.plugin:2022.4.1 > edu.wpi.first:GradleRIO:2022.4.1
No matching variant of edu.wpi.first:native-utils:2022.8.2 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute ‘org.gradle.plugin.api-version’ with value ‘7.3.3’ but:
- Variant ‘apiElements’ capability edu.wpi.first:native-utils:2022.8.2 declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
- Other compatible attribute:
- Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.3.3’)
- Variant ‘runtimeElements’ capability edu.wpi.first:native-utils:2022.8.2 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
- Other compatible attribute:
- Doesn’t say anything about org.gradle.plugin.api-version (required ‘7.3.3’)

I cant find any of the stuff its referring to is there any sort of quick fix can I do?

You’re trying to compile with an old JDK. Are you building within the WPILib-installed version of vscode?

I think so yeah, im following what they tell you to do when you want to push your code to the bot on the FIRST robotics page for programming

Your problem is more fundamental then pushing the code. You need to step back to the steps before that.

How did you install the WPILib development environment? Please link the instructions you followed.
Where did you get the project?
Why is the project using a 2022 version of WPILib?

  1. Well, the development environment came preinstalled, and the laptop it’s on was given to me by the FIRST robotics team at my school. Before you ask if I can just get help from the other programmers, there are none. At least none that show up.

2.If by the project you’re referring to the template, that is from this sort of addon they have on VScode whether I should call that WPILib or not I don’t know

  1. I didn’t think there would be any significance to versions other than just everything running smoother and faster.

these are the instructions you can also look at the rest of first through this

Should I reinstall everything then?

If you want a screenshot of what the UI for picking the template looks like I can post that

I would recommend installing the latest version of wpilib and seeing if your issue continues.

System.IO.FileNotFoundException: Could not find file ‘C:\Users\JagBots3\Documents\New WPILIB\WPILib-VSCode-1.74.2.zip’.
File name: ‘C:\Users\JagBots3\Documents\New WPILIB\WPILib-VSCode-1.74.2.zip’
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
at WPILibInstaller.ViewModels.VSCodePageViewModel.DownloadVsCodeFunc() in D:\a\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\WPILibInstaller-Avalonia\ViewModels\VSCodePageViewModel.cs:line 279

it failed

To install?

What option did you choose for installing VS Code?

I got it to work! I just had to select a different installation option, thank you guys!

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