Closed fortraan closed 6 years ago
TFObjectDector
is not in the org.firstinspires.ftc.robotcore.internal.tfod
package.
The correct import for that file is import org.firstinspires.ftc.robotcore.external.tfod.TFObjectDetector;
and the respective AAR files seem to match that.
You can try running a command-line build from the root of the project via ./gradlew assemble
to check if the issue is Gradle issues with Android Studio or if the build is really breaking. If the build is really breaking, try redownloading the various AARs that are on GitHub and replace your current AAR files with those fresh copies.
I'm not sure why, but somehow it just fixed itself. I removed all dependencies of RobotCore-release.aar
, synced Gradle, added them back in, and now it works. I don't know why that fixed it,but I'm not going to complain.
The Problem
The example code provided,
ConceptTensorflowObjectDetection
andConceptTensorflowObjectDetectionWebcam
, do not work. Specifically, the typeTFObjectDetector
is not found.What we've done about it
Looking through
RobotCore-release-sources.jar
, we found the implementation for Tensorflow support inorg.firstinspires.ftc.robotcore.internal.tfod
. However, it seems the.aar
files do not match the sources. We've tried copying the contents oftfod
elsewhere and using those, but it didn't work.Note: We changed the java compile version to 1.8, since we use features from JDK 1.8. We don't know if this is the problem.