ftctechnh / ftc_app

FTC Android Studio project to create FTC Robot Controller app.
761 stars 3.16k forks source link

Drive Station phone unable to find OpModes #639

Closed CodingKoopa closed 5 years ago

CodingKoopa commented 6 years ago

Our team has setup OnBot Java, and have written several OpModes for it. We were able to compile the Java code, and the OpModes were recognized as expected. However, we have been transitioning over to Android Studio, and can no longer get any options to appear in either of the two OpMode menus of the Drive Station phone. I have made sure that Instant Run is disabled in our Android Studio settings, and that the couple of testing OpModes we’ve wrote within Android Studio are marked (one with @Autonomous, and one with @TeleOp). It’s the same as the code that used to work in OnBot Java. When building and running the code, thought, nothing shows up.

Additionally, even when going back to the original OnBot Java setup, we still can’t get any OpModes to show up.

I’ll add that while setting up Android Studio, I added, compiled, and installed a class in the org.firstinspires.ftc.teamcode.autonomous package for organization, and without being properly marked. Both of those things have been fixed now, but I had to change the class name as there was an error about the name already being registered.

gearsincorg commented 6 years ago

Did you remember to comment out the @disable line?

dmssargent commented 6 years ago

What steps have you taken to revert to the OnBotJava setup?

CodingKoopa commented 6 years ago

Did you remember to comment out the @disable line?

Yes I have.

What steps have you taken to revert to the OnBotJava setup?

I have recompiled the code, from the OnBot Java interface. I don't believe I've reinstalled the Robot Controller app cleanly from the Google Play Store (without overwriting it from Android Studio) though, that's something I'll try.

CodingKoopa commented 5 years ago

The issue has been resolved on the end of OnBotJava by installing the Drive Station app update, and ensuring that the phones are paired correctly. The issue was that the phone was not correctly connecting to the Robot Controller, and was silently failing to fetch the OpMode list. What exactly caused this, I’m not sure.

I’ll report back with the updated results for Android Studio as soon as I can.

CodingKoopa commented 5 years ago

Having taken the steps previously mentioned, the Android Studio OpModes are fixed.