Java command based error

I have just made a subsystem to drive the robot but when I try to call it in a command I get the error DriveSubsystem cannot be resolved or is not a fieldJava(33554502). does anyone know why this is happening?

Did you import the subsystem? How are you referencing it? Having more context of your code will help.

here is the subsystem

/----------------------------------------------------------------------------/
/* Copyright © 2018 FIRST. All Rights Reserved. /
/
Open Source Software - may be modified and shared by FRC teams. The code /
/
must be accompanied by the FIRST BSD license file in the root directory of /
/
the project. /
/
----------------------------------------------------------------------------*/

package frc.robot.subsystems;

import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.Joystick;
import com.ctre.phoenix.motorcontrol.; / New for 2018 /
import com.ctre.phoenix.motorcontrol.can.
; /* New for 2018 */
import com.revrobotics.CANSparkMax;
import com.revrobotics.ControlType;
import com.revrobotics.CANPIDController;
import com.revrobotics.CANEncoder;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;

/**

  • Add your docs here.
    */

public class DriveSubsystem extends Subsystem {
WPI_TalonSRX SRXsteer = new WPI_TalonSRX(4);
CANSparkMax MAXdrive = new CANSparkMax(0, MotorType.kBrushless);
public DriveSubsystem() {
SRXsteer.setSelectedSensorPosition(0, 0, 0);
int kTimeoutMs = 10;
int kPIDLoopIdx = 0;
int absolutePosition = SRXsteer.getSelectedSensorPosition(kTimeoutMs) & 0xFFF;

		SRXsteer.setSelectedSensorPosition(absolutePosition,kPIDLoopIdx, kTimeoutMs);
	
	   	SRXsteer.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative,kPIDLoopIdx,kTimeoutMs);
	   	SRXsteer.setSensorPhase(true);
       
       	SRXsteer.configNominalOutputForward(0,kTimeoutMs);
        SRXsteer.configNominalOutputReverse(0,kTimeoutMs);
        SRXsteer.configPeakOutputForward(1, kTimeoutMs);
        SRXsteer.configPeakOutputReverse(-1,kTimeoutMs);
        
        SRXsteer.configAllowableClosedloopError(0,kPIDLoopIdx,kTimeoutMs);
        
        SRXsteer.config_kF(kPIDLoopIdx, 0.0,kTimeoutMs);
        SRXsteer.config_kP(kPIDLoopIdx, 0.8,kTimeoutMs);
        SRXsteer.config_kI(kPIDLoopIdx, 0.0,kTimeoutMs);
        SRXsteer.config_kD(kPIDLoopIdx, 0.0,kTimeoutMs);

}

@Override
public void initDefaultCommand() {
}
public void Swerve(double FWD, double STR, double RCW) {
double L,W,R,A,B,C,D,ws1,ws2,ws3,ws4,wa1,wa2,wa3,wa4,max,currentAngle,rotationAmmount;
currentAngle = SRXsteer.getSelectedSensorPosition(0)/11.4666;
L = 10;
W = 10;
R = Math.sqrt( (LL)+(WW) );
A = STR - RCW*(L/R);
B = STR + RCW*(L/R);
C = FWD - RCW*(W/R);
D = FWD + RCW*(W/R);
ws1 = Math.sqrt( (BB)+(CC) );
ws2 = Math.sqrt( (BB)+(DD) );
ws3 = Math.sqrt( (AA)+(DD) );
ws4 = Math.sqrt( (AA)+(CC) );
wa1 = Math.atan2(B,C)*180/Math.PI;
wa2 = Math.atan2(B,D)*180/Math.PI;
wa3 = Math.atan2(A,D)*180/Math.PI;
wa4 = Math.atan2(A,C)*180/Math.PI;
max = ws1;
if(ws2 > max) {
max = ws2;
}
if(ws3 > max) {
max = ws3;
}
if(ws4 > max) {
max = ws4;
}
if (max > 1) {
ws1/=max;
ws2/=max;
ws3/=max;
ws4/=max;
}
rotationAmmount = Math.IEEEremainder(wa1-currentAngle,360);
SmartDashboard.putNumber(“EncoderPosition”, SRXsteer.getSelectedSensorPosition(0));
SmartDashboard.putNumber(“angle”, currentAngle);
SmartDashboard.putNumber(“output”, rotationAmmount);
SmartDashboard.putNumber(“WheelAngle”, wa1);
SmartDashboard.putNumber(“WheenSpeed”, ws1);
SmartDashboard.putNumber(“WheelAngle2”, wa2);
SmartDashboard.putNumber(“WheenSpeed2”, ws2);
SmartDashboard.putNumber(“WheelAngle3”, wa3);
SmartDashboard.putNumber(“WheenSpeed3”, ws3);
SmartDashboard.putNumber(“WheelAngle4”, wa4);
SmartDashboard.putNumber(“WheenSpeed4”, ws4);

	MAXdrive.set(ws1);
	SRXsteer.set(ControlMode.Position,(currentAngle+rotationAmmount)*11.46666);

}
}

here is the command

/----------------------------------------------------------------------------/
/* Copyright © 2018 FIRST. All Rights Reserved. /
/
Open Source Software - may be modified and shared by FRC teams. The code /
/
must be accompanied by the FIRST BSD license file in the root directory of /
/
the project. /
/
----------------------------------------------------------------------------*/

package frc.robot.commands;

import frc.robot.subsystems.DriveSubsystem;
import edu.wpi.first.wpilibj.command.Command;
import frc.robot.OI;
import frc.robot.Robot;
import frc.robot.subsystems.DriveSubsystem;
import java.lang.module.ModuleDescriptor.Requires;
import java.lang.module.ModuleDescriptor.Requires;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
import frc.robot.Robot;
public class SwerveDrive extends Command {
public SwerveDrive() {
requires(Robot.DriveSubsystem);
}

// Called just before this Command runs the first time
@Override
protected void initialize() {
Robot.DriveSubsystem.stop();
}

// Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
Robot.DriveSubsystem.Swerve(1,1,1);

}

// Make this return true when this Command no longer needs to run execute()
@Override
protected boolean isFinished() {
return false;
}

// Called once after isFinished returns true
@Override
protected void end() {
}

// Called when another command which requires one or more of the same
// subsystems is scheduled to run
@Override
protected void interrupted() {
}
}

How did you declare the DriveSubsystem in your Robot class?

I have not done that. what would the command to do so be?