SparkMaxDriver could not be loaded

Hi our team is making the switch this year both from LABView to Java and from Talons and CIMs to Spark Max and NEO. We attempted to load some code to drive the motors to the RIO and got the following error:

  • java.io.IOException: SparkMaxDriver could not be loaded from path or an embedded resource.
  • attempted to load for platform /linux/athena/
  • at edu.wpi.first.wpiutil.RuntimeLoader.loadLibrary(RuntimeLoader.java:79)
  • at com.revrobotics.jni.RevJNIWrapper.(RevJNIWrapper.java:43)
  • at com.revrobotics.CANSparkMaxLowLevel.(CANSparkMaxLowLevel.java:38)
  • at frc.robot.subsystems.DriveSubsystem.(DriveSubsystem.java:57)
  • at frc.robot.Robot.(Robot.java:28)
  • at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:221)
  • at frc.robot.Main.main(Main.java:27)

When I open the driver station the Robot Code indicator is red. I have sent a blank template to the RIO and the indicator has turned green so the RIO seems to be fine. Any help with where to start with this would be appreciated.

Thank you,
353, The POBots

Can you make sure you are using the latest 2020 version of WPILib and VS Code, as well as the latest Spark Max API v1.5.1

We are ib v1.5.1 on the Spark Max API. I don’t think we are on the 2020 version of VS Code and I’m not sure how to check WPI lib

If you didn’t run the 2020 installer and import your project into 2020, you’re using a 2019 version of wpilib, and the Spark libraries will fail to load. You need to install 2020 and import your project into 2020.

https://docs.wpilib.org/en/latest/docs/getting-started/getting-started-frc-control-system/wpilib-setup.html

I have the same problem but, i downloaded all the new SparkMax firmaware (1.5.1), the RIO Version and the WPI 2020 version.
i dont know what to do, pls help us :slight_smile:

Double check you’re running the most recent Java 8 JDK. The Rio will allow you to deploy without having the JDK locally, but it won’t run without the most recent version.

We ran into this problem on 2 of our laptops. On a third laptop we simply had to push the project to GitHub, delete it from the laptop, then pull it again, refreshing the project (or something like that?).

Hope either of those help you!

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