HuskyLens Package - com.qualcomm.hardware.dfrobot

I just downloaded the latest version of the RobotController and when i try build the code, it is failing with the package com.qualcomm.hardware.dfrobot does not exist. It points to the sample file from External folder SensorHuskyLens.java

It also points to several other errors as below.

Task :FtcRobotController:compileDebugJavaWithJavac
C:\Users\13152\StudioProjects\FtcRobotController23\FtcRobotController\src\main\java\org\firstinspires\ftc\robotcontroller\external\samples\SensorHuskyLens.java:35: error: package com.qualcomm.hardware.dfrobot does not exist
import com.qualcomm.hardware.dfrobot.HuskyLens;
^
C:\Users\13152\StudioProjects\FtcRobotController23\FtcRobotController\src\main\java\org\firstinspires\ftc\robotcontroller\external\samples\SensorHuskyLens.java:68: error: cannot find symbol
private HuskyLens huskyLens;
^
symbol: class HuskyLens
location: class SensorHuskyLens
C:\Users\13152\StudioProjects\FtcRobotController23\FtcRobotController\src\main\java\org\firstinspires\ftc\robotcontroller\external\samples\SensorHuskyLens.java:73: error: cannot find symbol
huskyLens = hardwareMap.get(HuskyLens.class, “huskylens”);
^
symbol: class HuskyLens
location: class SensorHuskyLens
C:\Users\13152\StudioProjects\FtcRobotController23\FtcRobotController\src\main\java\org\firstinspires\ftc\robotcontroller\external\samples\SensorHuskyLens.java:114: error: package HuskyLens does not exist
huskyLens.selectAlgorithm(HuskyLens.Algorithm.TAG_RECOGNITION);
^
C:\Users\13152\StudioProjects\FtcRobotController23\FtcRobotController\src\main\java\org\firstinspires\ftc\robotcontroller\external\samples\SensorHuskyLens.java:140: error: package HuskyLens does not exist
HuskyLens.Block blocks = huskyLens.blocks();
^
Note: C:\Users\13152\StudioProjects\FtcRobotController23\FtcRobotController\src\main\java\org\firstinspires\ftc\robotcontroller\internal\FtcRobotControllerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
5 errors

Task :FtcRobotController:compileDebugJavaWithJavac FAILED

Is this a clean build, or did you “refresh” or “upgrade” an existing package in the same location? It sounds as if you need to clean your build, clear your cache, and build again (for whatever reason it’s not building the new changes).

-Danny

Hi Danny, I upgraded the project and performed the clean and build again and it reported the same issue.

I’m sorry, did you say this was a perfectly clean 9.0.1 version with no changes, or is this your team’s project you’re updating? It seems like you didn’t integrate changes properly, and the new samples were integrated but the dependencies to the core SDK didn’t come over.

When I pull a completely fresh 9.0.1 with no changes, I don’t see this problem whatsoever.

What does your build.dependencies.gradle file look like?

-Danny

EDIT: Fixed filename, thanks @cmacfarlane

Along the lines of what ddiaz is saying, I suspect your build.dependencies.gradle file does not contain the v9.0.1 artifacts, which would imply your update process was not complete.

See: https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/build.dependencies.gradle

Thank you @ddiaz and @cmacfarlane for your help and resources. I pulled the project again and just updated my ‘teamcode’. all other issues resolved automatically. I think the problem was that the dependecies were NOT properly integrated in my code base.

Thank you for your timely help, greatly appreciated!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.