Announcement

Collapse
No announcement yet.

Upgrading to SDK 6.2 Causes Build Failure (package not found)

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

  • 4634 Programmer
    replied
    Originally posted by gfisbeck View Post
    alan_16072 Thanks for the suggestion. I tried to force a Gradle sync, but I'm still getting the same issue. I've tried rebuilding the project, I've tried invalidating caches, but I'm still not able to get the project to build after updating to the new SDK.
    There were some gradle file changes in 6.2 that you're probably not picking up with your non-standard update process.

    Generally the two ways to do an update are:
    1) If using git, add the FIRST repo as an upstream remote and pull from it
    2) If not using git, download ZIP of new SDK and copy ONLY the src/main/java folder of the TeamCode module from the previous project into the new one.

    Leave a comment:


  • gfisbeck
    replied
    alan_16072 Thanks for the suggestion. I tried to force a Gradle sync, but I'm still getting the same issue. I've tried rebuilding the project, I've tried invalidating caches, but I'm still not able to get the project to build after updating to the new SDK.

    Leave a comment:


  • alan_16072
    replied
    Often Android Studio gets confused when you change branches with different gradle files. I suggest forcing a gradle sync.

    Leave a comment:


  • gfisbeck
    replied
    As an interesting side note, when I switch back to the "master" branch, the problems persist. If I delete the folder from disk, then re-clone from github, I'm able to build again.

    Leave a comment:


  • Upgrading to SDK 6.2 Causes Build Failure (package not found)

    This morning I tried to upgrade our project to 6.2. I did the upgrade as I usually do (using Android Studio):
    • Download the new code from GitHub (https://github.com/FIRST-Tech-Challe...obotController) to my local computer
    • Created a new Branch for the SDK update
    • Manually copied everything except the TeamCode directory from the download to my new branch (overwriting files/folders as necessary)
    At this point, I tried to build the project and I get errors indicated "package <xyz> does not exist" (see output below).

    I'm sure this is a process problem, but I've done it this way for the past few years. Can anyone point me in the right direction?



    Code:
    Executing tasks: [:TeamCode:assembleDebug] in project /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app
    
    > Task :TeamCode:preBuild UP-TO-DATE
    > Task :TeamCode:preDebugBuild UP-TO-DATE
    > Task :TeamCode:compileDebugAidl NO-SOURCE
    > Task :TeamCode:compileDebugRenderscript NO-SOURCE
    > Task :TeamCode:generateDebugBuildConfig UP-TO-DATE
    > Task :TeamCode:javaPreCompileDebug UP-TO-DATE
    > Task :TeamCode:generateDebugResValues UP-TO-DATE
    > Task :TeamCode:generateDebugResources UP-TO-DATE
    > Task :TeamCode:mergeDebugResources UP-TO-DATE
    > Task :TeamCode:createDebugCompatibleScreenManifests UP-TO-DATE
    > Task :TeamCode:extractDeepLinksDebug UP-TO-DATE
    > Task :TeamCode:processDebugManifest UP-TO-DATE
    > Task :TeamCode:processDebugResources UP-TO-DATE
    
    > Task :TeamCode:compileDebugJavaWithJavac FAILED
    The following annotation processors are not incremental: jetified-OpModeAnnotationProcessor.jar (OpModeAnnotationProcessor.jar).
    Make sure all annotation processors are incremental to improve your build speed.
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:3: error: package com.qualcomm.robotcore.eventloop.opmode does not exist
    import com.qualcomm.robotcore.eventloop.opmode.LinearOpMo de;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:4: error: package com.qualcomm.robotcore.hardware does not exist
    import com.qualcomm.robotcore.hardware.DcMotor;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:5: error: package com.qualcomm.robotcore.hardware does not exist
    import com.qualcomm.robotcore.hardware.HardwareMap;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:6: error: package com.qualcomm.robotcore.hardware does not exist
    import com.qualcomm.robotcore.hardware.Servo;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:7: error: package com.qualcomm.robotcore.util does not exist
    import com.qualcomm.robotcore.util.ElapsedTime;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:9: error: package org.firstinspires.ftc.robotcore.external.navigatio n does not exist
    import org.firstinspires.ftc.robotcore.external.navigatio n.Acceleration;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:10: error: package org.firstinspires.ftc.robotcore.external.navigatio n does not exist
    import org.firstinspires.ftc.robotcore.external.navigatio n.Orientation;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:16: error: cannot find symbol
    public Servo ShoulderServo;
    ^
    symbol: class Servo
    location: class Grabber8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:17: error: cannot find symbol
    public Servo GripServo;
    ^
    symbol: class Servo
    location: class Grabber8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:31: error: cannot find symbol
    HardwareMap hwMap = null;
    ^
    symbol: class HardwareMap
    location: class Grabber8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:32: error: cannot find symbol
    private ElapsedTime period = new ElapsedTime();
    ^
    symbol: class ElapsedTime
    location: class Grabber8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:35: error: cannot find symbol
    private LinearOpMode myOpMode;
    ^
    symbol: class LinearOpMode
    location: class Grabber8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:36: error: cannot find symbol
    private ElapsedTime runtime = new ElapsedTime();
    ^
    symbol: class ElapsedTime
    location: class Grabber8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Grabber8513.java:41: error: cannot find symbol
    public void init(HardwareMap ahwMap) {
    ^
    symbol: class HardwareMap
    location: class Grabber8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:3: error: package com.qualcomm.robotcore.eventloop.opmode does not exist
    import com.qualcomm.robotcore.eventloop.opmode.LinearOpMo de;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:4: error: package com.qualcomm.robotcore.hardware does not exist
    import com.qualcomm.robotcore.hardware.DcMotor;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:5: error: package com.qualcomm.robotcore.hardware does not exist
    import com.qualcomm.robotcore.hardware.DcMotorSimple;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:6: error: package com.qualcomm.robotcore.hardware does not exist
    import com.qualcomm.robotcore.hardware.HardwareMap;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:7: error: package com.qualcomm.robotcore.util does not exist
    import com.qualcomm.robotcore.util.ElapsedTime;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:18: error: cannot find symbol
    public DcMotor intakeMotor = null;
    ^
    symbol: class DcMotor
    location: class Intake8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:27: error: cannot find symbol
    HardwareMap hwMap = null;
    ^
    symbol: class HardwareMap
    location: class Intake8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:28: error: cannot find symbol
    private ElapsedTime period = new ElapsedTime();
    ^
    symbol: class ElapsedTime
    location: class Intake8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:31: error: cannot find symbol
    private LinearOpMode myOpMode;
    ^
    symbol: class LinearOpMode
    location: class Intake8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:32: error: cannot find symbol
    private ElapsedTime runtime = new ElapsedTime();
    ^
    symbol: class ElapsedTime
    location: class Intake8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:41: error: cannot find symbol
    public void init(HardwareMap ahwMap) {
    ^
    symbol: class HardwareMap
    location: class Intake8513
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Intake8513.java:73: error: package DcMotor does not exist
    public void setMode(DcMotor.RunMode mode) {
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Vision8513.java:3: error: package com.qualcomm.robotcore.hardware does not exist
    import com.qualcomm.robotcore.hardware.HardwareMap;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Vision8513.java:5: error: package org.firstinspires.ftc.robotcore.external does not exist
    import org.firstinspires.ftc.robotcore.external.ClassFact ory;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Vision8513.java:6: error: package org.firstinspires.ftc.robotcore.external.hardware. camera does not exist
    import org.firstinspires.ftc.robotcore.external.hardware. camera.WebcamName;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Vision8513.java:7: error: package org.firstinspires.ftc.robotcore.external.navigatio n does not exist
    import org.firstinspires.ftc.robotcore.external.navigatio n.VuforiaLocalizer;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Vision8513.java:8: error: package org.firstinspires.ftc.robotcore.external.tfod does not exist
    import org.firstinspires.ftc.robotcore.external.tfod.Reco gnition;
    ^
    /Users/greg.fisbeck/StudioProjects/2020-8513-ftc_app/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Vision8513.java:9: error: package org.firstinspires.ftc.robotcore.external.tfod does not exist
    import org.firstinspires.ftc.robotcore.external.tfod.TFOb jectDetector;
Working...
X