Announcement

Collapse
No announcement yet.

APK not installing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • APK not installing

    AS no longer launches the APK when I hit run. Yesterday everything worked. When I modified code and hit run, Gradle built successfully and the app was installed on the DS phone, and opmodes showed up on the RC phone. Today that's not happening.

    This is what happened:
    1. Phone stopped registering with AS as a connectable device. After trying several things I swapped the cable and the phone was shown as a connectable device. Not sure why the first cable stopped working.
    2. Opmodes didn't show on DS. After investigating it seems that the FTC app isn't loading.

    3. Gradle builds successfully and sometimes there is a message saying "launching activity", then "applying filter", but the app doesn't load. I think it used to add "launching APK" and the app would load and restart. That's not happening now. What would cause this?
    I restarted both phones and the computer. The app loaded once and everything ran OK. After that I tried to run the program again and it will no longer install the app.

    @disabled is commented out (for the opmode I'm working on)
    USB debugging is enabled and the phone is connected as a media device.
    Wifi is on.

    I have no idea why this should suddenly start happening when everything seemed to be running fine.
    Any help will be appreciated.

  • #2
    Did you install the APK on the phone that connects to the robot? Because you need to. If you did, I would make sure that the phone I am plugging into the computer has the FTC Robot Controller on it. The only other issue I could think of is that when you changed your code, you made a mistake and it is having run time errors. So check AS and check if there is an error anywhere throughout your code.
    Happy Programming!

    Comment


    • #3
      OP wrote, "the app was installed on the DS phone"
      If you really did this then you now have the robot controller apk and the driver station apk on one phone. Delete the extra apk. Only use Android Studio to install the robot controller app on the robot controller phone.

      OP wrote, "the phone is connected as a media device"
      The phone has to be in charge only mode.

      Comment


      • #4
        Oops! I'm sorry , I meant to say that the app was installed on the RC phone and the opmodes fail to show on the DS phone.

        I don't think that I'm having runtime errors. No error messages and Gradle builds successfully.

        I tried having the phone in charge only mode some time ago and nothing loaded. When I switched to media device mode, everything started working. i just tried charge only again and still nothing.

        Comment


        • #5
          Do you have status indications that the phones are connected?

          Comment


          • #6
            yes, they're connected. Ping time is 3ms.

            Comment


            • #7
              I'm assuming that you have your annotations setup and all. You can check that the annotated register is enabled which it probably is. It's in FtcRobotController -> java -> org.firstinspires.ftc.robotcontroller -> internal -> testcode. Do the DS and RC phones have the same version of the app? Other than that, it could be a hardware/software issue your phones.

              Comment


              • #8
                This is what I did when I had APK downloading issues. Save your code somewhere such as notepad. Then close the project, and click on import project. Then you should redo the app, and paste the code back in. This worked for me and I hope it works for you.
                Happy Programming

                Comment


                • #9
                  Our team is having what sounds like the same problem. Everything seems to be connected perfectly but the DS is not seeing the Op Modes. We are so frustrated. We wish we could have just left everything alone from last season. Our communication still worked great before we had to upgrade. Any help would be greatly appreciated.

                  Comment


                  • #10
                    OP said "Wifi is on." Please ensure that WiFi itself is off, but WiFi Direct is on and active.

                    Comment


                    • #11
                      Our phones are in Airplane Mode with Direct Wifi connected. No problems pairing. Just can't see the TeleOp program on the DS.

                      Comment


                      • #12
                        Thanks for the input. I took a break overnight and the problem seems to have resolved itself. I don't know why or how, but the APK is now installing after building the project and the opmodes are appearing in the right place. i hope the problem doesn't surface again.

                        Comment


                        • #13
                          I was working with a team over the weekend that couldn't install the Robot Controller APK via Android Studio. I was able to install it on a different phone (both were ZTE Speeds) and see that the RC app reported a duplicate op mode name. The team renamed the op mode, uninstalled the RC app on the original phone, and installed the APK on the original phone.

                          I might have been able to see the duplicate op mode error if I had uninstalled the RC app on the original phone, but I didn't want to run the risk of removing their code from their RC phone and being unable to get it back.
                          John McDonnell
                          Co-Mentor, Team 5873
                          https://www.facebook.com/Team5873

                          Comment

                          Working...
                          X