We are trying to get swerve working and have repeatedly gotten this error:
Unhandled exception: java.lang.NoSuchMethodError: 'com.revrobotics.REVLibError com.revrobotics.spark.SparkClosedLoopController.setReference(double, com.revrobotics.spark.SparkBase$ControlType, int, double)'
Error at swervelib.motors.SparkMaxSwerve.lambda$setReference$3(SparkMaxSwerve.java:404): Unhandled exception: java.lang.NoSuchMethodError: 'com.revrobotics.REVLibError com.revrobotics.spark.SparkClosedLoopController.setReference(double, com.revrobotics.spark.SparkBase$ControlType, int, double)'
at swervelib.motors.SparkMaxSwerve.lambda$setReference$3(SparkMaxSwerve.java:404)
at swervelib.motors.SparkMaxSwerve.configureSparkMax(SparkMaxSwerve.java:95)
at swervelib.motors.SparkMaxSwerve.setReference(SparkMaxSwerve.java:403)
at swervelib.SwerveModule.setDesiredState(SwerveModule.java:417)
at swervelib.SwerveModule.setDesiredState(SwerveModule.java:378)
at swervelib.SwerveDrive.setRawModuleStates(SwerveDrive.java:634)
at swervelib.SwerveDrive.drive(SwerveDrive.java:544)
The robot program quit unexpectedly. This is usually due to a code error.
The above stacktrace can help determine where the error occurred.
See https://wpilib.org/stacktrace for more information.
at swervelib.SwerveDrive.drive(SwerveDrive.java:498)
at frc.robot.subsystems.swervedrive.SwerveSubsystem.drive(SwerveSubsystem.java:420)
at frc.robot.commands.swervedrive.AbsoluteDriveAdv.execute(AbsoluteDriveAdv.java:137)
at edu.wpi.first.wpilibj2.command.CommandScheduler.run(CommandScheduler.java:288)
at frc.robot.Robot.robotPeriodic(Robot.java:23)
We have all the newest versions of the required libraries, and all of the firmware on our bot is updated for 2025. We are stuck and have no ideas on how to fix this. Any ideas?