I am trying to get my app to run on a Android phone, and one of the tings stopping it from working, is : ‘class or interface’, Here is the code:
@TeleOp(name=“TeleOpPrototype1”, group = “TeleOpPrototypes”)
public class TeleOpPrototype1 extends LinearOpMode}
// private DcMotor motorLeft = null;
// private DcMotor motorRight = null;
// private DcMotor armMotor1 = null;
// private DcMotor armMotor2 = null;
// private DcMotor armMotor3 = null;
// private Servo gripServo = null;
// private Servo ejecterServo = null;
private DcMotor ForeArm = null;
private DcMotor UpperArm = null;
private DcMotor LeftWheel = null;
private DcMotor RightWheel = null;
private Servo Clamp = null;
private Servo Ejector = null;
private static final class ARM_RETRACTED_POSITION = 0.2;
private static final class ARM_RETRACTED_POSITION = 0.8;
That is the whole class.
Everything in blue is throwing up a ‘class or interface’ warning. I am also ignoring everything in the //. Should I pay attention to that?
You can’t declare variables outside of a class; which is what the editor thinks you are doing now.
I really don’t think you want ARM_RETRACTED_POSITION to be a class either.
You’ve somehow managed to type a } after LinearOpMode, it should be at the very bottom of the file.
Yeah, I know about the bracket. I also had a ‘looking for }’ or ‘invalid ;’. On the other hand, I did use the LeftWheel and RightWheel once after that. I also have a hardware map file. Would I implement it into this?
No, seriously. I’m am very confused.
- You say you know about the bracket. Great. Did you fix it?
- You say you used LeftWheel and RightWheel after… something. Yet before you claimed the entire file had been posted. Which is it?
- What are you trying to say about the hardware map file? “Implement it” doesn’t really make any sense, as I seriously doubt your hardware map is an interface. If it is, you’re doing something wrong.
It would be a lot easier to help you if I could view your code on github or something similar.
Sorry, yes, turning it to brackets did help. I was getting errors for turning it to brackets, but they might not have been in the right place.