We are programming with Java as an option this year, and whenever we call the RobotDrive class, we get an error stating:
“Cannot find symbol:
class RobotDrive”
What should we do?
All help is greatly appreciated!
- Team 1816 -
We are programming with Java as an option this year, and whenever we call the RobotDrive class, we get an error stating:
“Cannot find symbol:
class RobotDrive”
What should we do?
All help is greatly appreciated!
Have you imported the RobotDrive class? The default examples only import the IterativeRobot or SimpleRobot classes, nothing else. You could import all the WPILibJ classes in one fell swoop with this line:
import edu.wpi.first.wpilibj.*
The Source > Fix Imports function in netbeans is cool. Just use it all the time when you see random yellow lightbulbs in your code.
If the asterisk at the end of your wpilib import call doesn’t work, use the netbeans autofill feature to add RobotDrive class as its own import. Whenever I have import problems, I just add the individual class in my import field. Hope you don’t have to do that though, it gets a bit tedious when your team uses a lot of components which require a lot of classes.