Radio Connected, but RoboRIO is not letting Code upload C++

We have established a connection to the Radio, Pinged the RIO successfully through the CMD, and all lights are green on DriverStation. Unfortunately, VSCode refuses to upload code, stopping at a 25% build before failure, saying it cannot find the RIO. What can we do to fix this issue, because last year’s code is on the RIO, but we are trying to upload two new motors, as well as other things. We cannot move forward in progress until this is solved.

Thanks for all the help you may give,
Team 2148

All updated, but still won’t deploy, error occurs at 25% build, and has something to do with “Linker”.

A more complete error message will be needed to help figure out the issue. Your code is probably trying to use a library or function that’s no longer there.

Did you check the “build for desktop” option in vscode when creating your project?

I’m not sure if it was checked. If not, how can we fix it?

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

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

A build operation failed.
Linker failed while linking frcUserProgram.
See the complete log at: file:///C:/Users/evsd/Desktop/VSCode%202019%20Sparky/SparkyII/build/tmp/linkFrcUserProgramReleaseExecutable/output.txt

  • 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.
    ==============================================================================

2: Task failed with an exception.

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

A failure occurred while executing jaci.gradle.deploy.target.discovery.TargetDiscoveryWorker
Target roborio could not be found at any location! See above for more details.

  • 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

BUILD FAILED in 2s
4 actionable tasks: 3 executed, 1 up-to-date
Linker Error!
GradleRIO detected this build failed due to a Linker Error (linkFrcUserProgramReleaseExecutable).
Check that all your files are saved, then scroll up in this log for more information.
Missing Target!

Are you connected to the robot, and is it on?

GradleRIO detected this build failed due to not being able to find “roborio”!
Scroll up in this error log for more information.
The terminal process terminated with exit code: 1

You need to scroll up to see the actual errors, that’s just a summary of what happened during the build process. Note: you can use triple-backticks to block quote text in Discourse.

Regarding disabling desktop builds, to change the setting, go to the WPILib menu in vscode and run “WPILib: Change Desktop Support Enabled Setting”.

Desktop was disabled, and it won’t even build correctly now, even when reverted back to the original settings. What files do you need specifically from the code?

Without seeing the error message, I don’t know what to ask for. You should be able to scroll up the output/terminal window to see what errors are occurring earlier in the build. You want to start from the beginning.

Executing task in folder SparkyII: gradlew build -Dorg.gradle.java.home=“C:\Users\Public\frc2019\jdk” <

Task :linkFrcUserProgramReleaseExecutable FAILED
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\objs\frcUserProgram\release\frcUserProgramCpp\azl1xaarv081qut52gwipk3jr\SPARKYII.o: In function StartRobotClassImpl()': c:\users\public\frc2019\roborio\arm-frc2019-linux-gnueabi\usr\include\c++\6.3.0/functional:1689: multiple definition ofStartRobotClassImpl()’
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\objs\frcUserProgram\release\frcUserProgramCpp\3bg5a77l7vd4edmrxq5jco6ri\Robot.o:C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp/Robot.cpp:342: first defined here
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\objs\frcUserProgram\release\frcUserProgramCpp\azl1xaarv081qut52gwipk3jr\SPARKYII.o: In function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_data(char*)': C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpiutil-cpp-2019.1.1-headers.zip_09b38849dbdfa883c4be908731924be2/wpi/Twine.h:259: multiple definition ofmain’
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\objs\frcUserProgram\release\frcUserProgramCpp\3bg5a77l7vd4edmrxq5jco6ri\Robot.o:c:\users\public\frc2019\roborio\arm-frc2019-linux-gnueabi\usr\include\c++\6.3.0\bits/basic_string.tcc:211: first defined here
collect2.exe: error: ld returned 1 exit status

Task :compileFrcUserProgramDebugExecutableFrcUserProgramCpp
Warnings in file SPARKYII.cpp …
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:11:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\cameraserver-cpp-2019.1.1-headers.zip_8e6098f7e4e3b331e0504d2d66cebd71/CameraServer.h:14:2: warning: #warning is a GCC extension
#warning “CameraServer.h is deprecated; include cameraserver/CameraServer.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\cameraserver-cpp-2019.1.1-headers.zip_8e6098f7e4e3b331e0504d2d66cebd71/CameraServer.h:14:2: warning: #warning “CameraServer.h is deprecated;
include cameraserver/CameraServer.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:12:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/IterativeRobot.h:14:2: warning: #warning is a GCC extension
#warning “IterativeRobot.h is deprecated; include frc/IterativeRobot.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/IterativeRobot.h:14:2: warning: #warning “IterativeRobot.h is deprecated; include frc/IterativeRobot.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:13:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/LiveWindow/LiveWindow.h:14:2: warning: #warning is a GCC extension
#warning “LiveWindow/LiveWindow.h is deprecated; include frc/livewindow/LiveWindow.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/LiveWindow/LiveWindow.h:14:2: warning: #warning “LiveWindow/LiveWindow.h is deprecated; include frc/livewindow/LiveWindow.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:14:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/SmartDashboard/SendableChooser.h:14:2: warning: #warning is a GCC extension #warning “smartdashboard/SendableChooser.h is deprecated; include frc/smartdashboard/SendableChooser.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/SmartDashboard/SendableChooser.h:14:2: warning: #warning “smartdashboard/SendableChooser.h is deprecated; include frc/smartdashboard/SendableChooser.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:15:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/SmartDashboard/SmartDashboard.h:14:2: warning: #warning is a GCC extension
#warning “smartdashboard/SmartDashboard.h is deprecated; include frc/smartdashboard/SmartDashboard.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/SmartDashboard/SmartDashboard.h:14:2: warning: #warning “smartdashboard/SmartDashboard.h is deprecated; include frc/smartdashboard/SmartDashboard.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:16:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Joystick.h:14:2: warning: #warning is a GCC extension
#warning “Joystick.h is deprecated; include frc/Joystick.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Joystick.h:14:2: warning: #warning “Joystick.h is deprecated; include frc/Joystick.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:17:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/WPILib.h:14:2: warning: #warning is a GCC extension
#warning “WPILib.h is deprecated; include frc/WPILib.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/WPILib.h:14:2: warning: #warning “WPILib.h is deprecated; include frc/WPILib.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:18:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Ultrasonic.h:14:2: warning: #warning is a GCC extension
#warning “Ultrasonic.h is deprecated; include frc/Ultrasonic.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Ultrasonic.h:14:2: warning: #warning “Ultrasonic.h is deprecated; include frc/Ultrasonic.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:19:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Commands/Command.h:14:2: warning: #warning is a GCC extension
#warning “Commands/Command.h is deprecated; include frc/commands/Command.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Commands/Command.h:14:2: warning: #warning “Commands/Command.h is deprecated; include frc/commands/Command.h instead” [-Wcpp]
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:20:0:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Commands/Scheduler.h:14:2: warning: #warning is a GCC extension
#warning “Commands/Scheduler.h is deprecated; include frc/commands/Scheduler.h instead”
^~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/Commands/Scheduler.h:14:2: warning: #warning “Commands/Scheduler.h is deprecated; include frc/commands/Scheduler.h instead” [-Wcpp]
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp: In member function ‘virtual void Robot::RobotInit()’:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:95:58: warning: ‘void frc::SendableChooser::AddDefault(wpi::StringRef, T) [with T = std::__cxx11::basic_string]’ is deprecated: use SetDefaultOption() instead [-Wdeprecated-declarations]
m_chooser.AddDefault(kAutoNameDefault, kAutoNameDefault);
^
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/SmartDashboard/SendableChooser.h:19:0,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:14:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/smartdashboard/SendableChooser.h:57:8: note: declared here
void AddDefault(wpi::StringRef name, T object) {
^~~~~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:96:55: warning: ‘void frc::SendableChooser::AddObject(wpi::StringRef, T) [with T = std::__cxx11::basic_string]’ is deprecated: use AddOption() instead [-Wdeprecated-declarations]
m_chooser.AddObject(kAutoNameCustom, kAutoNameCustom);
^
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/SmartDashboard/SendableChooser.h:19:0,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:14:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/smartdashboard/SendableChooser.h:54:8: note: declared here
void AddObject(wpi::StringRef name, T object) { AddOption(name, object); }
^~~~~~~~~
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/IterativeRobotBase.h:10:0,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/IterativeRobot.h:10,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/IterativeRobot.h:19,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:12:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp: In function ‘int main()’:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/RobotBase.h:39:23: warning: ‘int StartRobotClassImpl()’ is deprecated:
Call frc::StartRobot() in your own main() instead of using the START_ROBOT_CLASS(Robot) macro. [-Wdeprecated-declarations]
int main() { return StartRobotClassImpl(); }
^
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:357:1: note: in expansion of macro ‘START_ROBOT_CLASS’
START_ROBOT_CLASS(Robot)
^~~~~~~~~~~~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/RobotBase.h:38:7: note: declared here
int StartRobotClassImpl() { return frc::StartRobot<ClassName>(); }
^
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:357:1: note: in expansion of macro ‘START_ROBOT_CLASS’
START_ROBOT_CLASS(Robot)
^~~~~~~~~~~~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/RobotBase.h:39:43: warning: ‘int StartRobotClassImpl()’ is deprecated:
Call frc::StartRobot() in your own main() instead of using the START_ROBOT_CLASS(Robot) macro. [-Wdeprecated-declarations]
int main() { return StartRobotClassImpl(); }
^
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:357:1: note: in expansion of macro ‘START_ROBOT_CLASS’
START_ROBOT_CLASS(Robot)
^~~~~~~~~~~~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/RobotBase.h:38:7: note: declared here
int StartRobotClassImpl() { return frc::StartRobot<ClassName>(); }
^
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:357:1: note: in expansion of macro ‘START_ROBOT_CLASS’
START_ROBOT_CLASS(Robot)
^~~~~~~~~~~~~~~~~
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp: In instantiation of ‘int frc::StartRobot() [with Robot = Robot]’:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:357:1: required from here
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:22:7: warning: ‘frc::IterativeRobot::IterativeRobot()’ is deprecated: Use TimedRobot instead. It’s a drop-in replacement that provides more regular execution periods. [-Wdeprecated-declarations]
class Robot : public frc::IterativeRobot {
^~~~~
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/IterativeRobot.h:19:0,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:12:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/IterativeRobot.h:28:3: note: declared here
IterativeRobot();
^~~~~~~~~~~~~~
In file included from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/IterativeRobotBase.h:10:0,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/IterativeRobot.h:10,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/IterativeRobot.h:19,
from C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\src\main\cpp\SPARKYII.cpp:12:
C:\Users\evsd\Desktop\VSCode 2019 Sparky\SparkyII\build\tmp\expandedArchives\wpilibc-cpp-2019.1.1-headers.zip_bbc5901b0e22ac527e7d642f2ec68009/frc/RobotBase.h:28:16: note: synthesized method ‘Robot::Robot()’ first required here
static Robot robot;
^~~~~

FAILURE: Build failed with an exception.

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

A build operation failed.
Linker failed while linking frcUserProgram.
See the complete log at: file:///C:/Users/evsd/Desktop/VSCode%202019%20Sparky/SparkyII/build/tmp/linkFrcUserProgramReleaseExecutable/output.txt

  • 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

BUILD FAILED in 3s
3 actionable tasks: 2 executed, 1 up-to-date
Linker Error!
GradleRIO detected this build failed due to a Linker Error (linkFrcUserProgramReleaseExecutable).
Check that all your files are saved, then scroll up in this log for more information.
The terminal process terminated with exit code: 1

That was the build errors it was giving us. The deploy errors were more extensive and probably would not fit in one cohesive reply.

It looks like you have something defined both in Robot.cpp and SPARKYII.cpp? Do you have a main() function in another file as well as the START_ROBOT_CLASS in SPARKYII.cpp?

Side note: you can hide the details behind a collapse in the forums (click the gear in the edit dialog). Triple-backticks ``` can be used to block-quote the text too.

I’m not exactly sure. There is a robot.cpp file, but it’s not open, it’s just in the same file as SparkyII.cpp.

The build system builds every .cpp file in the src directory regardless of whether it’s open in the editor or not. You shouldn’t have duplicate files there.

Ok, I will proceed to delete the files.

Build successful, but uploading still will not work.

Executing task in folder SparkyII: gradlew deploy -PteamNumber=2148 -Dorg.gradle.java.home=“C:\Users\Public\frc2019\jdk” <

Driver Station reported IP: 10.21.48.2

Task :discoverRoborio
Discovering Target roborio
admin @ 10.21.48.2: Connected.
Reason: InvalidImageException
RoboRIO Image invalid! RoboRIO: 2018_v16, allowed: [2019_v12]
admin @ null: Connected.
Reason: InvalidImageException
RoboRIO Image invalid! RoboRIO: 2018_v16, allowed: [2019_v12]
4 other action(s) failed resolution.
1 other action(s) resolved but not connected.
Run with --info for more details

Task :discoverRoborio FAILED

FAILURE: Build failed with an exception.

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

A failure occurred while executing jaci.gradle.deploy.target.discovery.TargetDiscoveryWorker
Target roborio could not be found at any location! See above for more details.

  • 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

BUILD FAILED in 4s
4 actionable tasks: 3 executed, 1 up-to-date
Missing Target!

Are you connected to the robot, and is it on?

GradleRIO detected this build failed due to not being able to find “roborio”!
Scroll up in this error log for more information.
The terminal process terminated with exit code: 1

You need to update the RoboRIO image. If you’re using a SPI gyro, you should update both WPILib to 2019.2.1 and the NI FRC update to 2019.1.0 so you can install 2019_v13, but otherwise v12 will work.