Announcement

Collapse
No announcement yet.

Update Issue

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

  • Update Issue

    I updated the FTC SDK recently and my gradle build keeps breaking. I get the error : Error:Execution failed for task ':FtcRobotController:compileReleaseJavaWithJavac'.
    > Compilation failed; see the compiler error output for details..

  • #2
    Well I figured out some stuff and changed my Java version to 8. It fixed most of the errors but I get this one now:

    Error:Could not resolve all dependencies for configuration ':TeamCode:androidJacocoAgent'.
    > Could not find org.jacocorg.jacoco.agent:0.7.5.201505241946.
    Searched in the following locations:
    file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
    file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
    file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/google/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
    file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/google/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
    file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/android/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
    file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/android/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
    file:/C:/Users/Robotics Team 9986/Desktop/Andriod Studio/gradle/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
    file:/C:/Users/Robotics Team 9986/Desktop/Andriod Studio/gradle/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
    file:/C:/Users/Robotics Team 9986/Desktop/ftc_app-master/libs/org.jacoco.agent-0.7.5.201505241946.jar
    file:/C:/Users/Robotics Team 9986/Desktop/ftc_app-master/libs/org.jacoco.agent.jar
    Required by:
    ftc_app-master:TeamCode:unspecified

    Comment


    • #3
      Originally posted by kg1 View Post
      Well I figured out some stuff and changed my Java version to 8. It fixed most of the errors but I get this one now:

      Error:Could not resolve all dependencies for configuration ':TeamCode:androidJacocoAgent'.
      > Could not find org.jacocorg.jacoco.agent:0.7.5.201505241946.
      Searched in the following locations:
      file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
      file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
      file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/google/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
      file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/google/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
      file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/android/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
      file:/C:/Users/Robotics Team 9986/Desktop/SDK/extras/android/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
      file:/C:/Users/Robotics Team 9986/Desktop/Andriod Studio/gradle/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
      file:/C:/Users/Robotics Team 9986/Desktop/Andriod Studio/gradle/m2repository/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
      file:/C:/Users/Robotics Team 9986/Desktop/ftc_app-master/libs/org.jacoco.agent-0.7.5.201505241946.jar
      file:/C:/Users/Robotics Team 9986/Desktop/ftc_app-master/libs/org.jacoco.agent.jar
      Required by:
      ftc_app-master:TeamCode:unspecified
      Jacoco wasn't compatibility with Android the way you seem to be using the last time I checked. Are you sure you need JaCoCo for whatever you are doing (it isn't required for Java 8 on Android). Can you post the respective build scripts required jacoco as a dependency?

      Comment


      • #4
        There are no Jacoco dependencies in the stock SDK

        You must have something custom in your build tree. I would suggest pulling
        a clean tree and doing another build and then comparing the build scripts
        from the clean tree to the build scripts from the tree within which you did
        the update.

        Comment


        • #5
          Originally posted by skatefriday View Post
          There are no Jacoco dependencies in the stock SDK

          You must have something custom in your build tree. I would suggest pulling
          a clean tree and doing another build and then comparing the build scripts
          from the clean tree to the build scripts from the tree within which you did
          the update.
          What I did was switched the Java version to 1_8 instead of 1_7. Should I switched it back? The reason I switched it was because I looked it up online and it fixed most of the 54 errors I was having.

          Comment


          • #6
            Originally posted by kg1 View Post
            What I did was switched the Java version to 1_8 instead of 1_7. Should I switched it back? The reason I switched it was because I looked it up online and it fixed most of the 54 errors I was having.
            There is no problem with switching Java from 1_7 to 1_8, however you had to have done more than that. For example, the default build system doesn't support Java 8, however Jack does (so you would have had to change that) and you would have to retarget your app to API 24. Also, I just found out that JaCoCo is available on Android N (which I don't believe is an allow platform for FIRST Tech Challenge), so you should just remove that dependency.

            Or you could post your build.gradles (all of them) with the respective location in your build.tree (here, PasteBin, Gist), or point to your public GitHub repo containing your robot code (not just the TeamCode module). We can help you narrow down what you are trying to do.

            Or you can follow skatefriday's advice, restore back to a default build, and re-add your dependencies one by one.

            Comment


            • #7
              Thank you but I fixed it by redownloading the sdk and redoing all my opmodes. I have one question though, in this new registering system, how do I register an opmode now? It is confusing me a little.

              Comment


              • #8
                I believe through annotations with the @TeleOp or @Autonomous at the beginning of the class is the way to do it. The sample files underneath the org.firstinspires.ftc.robotcontroller folder have the annotations.

                Comment


                • #9
                  Originally posted by kg1 View Post
                  Thank you but I fixed it by redownloading the sdk and redoing all my opmodes. I have one question though, in this new registering system, how do I register an opmode now? It is confusing me a little.
                  To register an OpMode in this system you basically add either a @TeleOp or @Autonomous (respectively depending on whether the OpMode is supposed to be Autonomous or TeleOp) right before the class declaration.

                  Example
                  @TeleOp public class MyTeleOp extends OpMode {
                  /* code */
                  }

                  @Autonomous
                  public class MyAutonomous extends LinearOpMode {
                  /* code */
                  }

                  You can set the display name by setting the annotation field for name, and you can configure a group by setting the group field in the annotation.
                  Example: To show "Red TeleOp" as the OpMode name, you can use the following:
                  @TeleOp(name = "Red TeleOp)

                  Comment


                  • #10
                    Oh thank you. Also thank you for everyone replied to this.

                    Comment

                    Working...
                    X