Skip to content

Got some CMake error while compiling the project using react-native-fast-tflite #141

Description

@tseng91301

I'm getting the following error while syncing my project. The error is:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TFLITE
linked by target "VisionCameraTflite" in directory C:/Data/Projects/react_native/robot-core-adv/node_modules/react-native-fast-tflite/android
TFLITE_GPU
linked by target "VisionCameraTflite" in directory C:/Data/Projects/react_native/robot-core-adv/node_modules/react-native-fast-tflite/android

I'm doing with Expo project, with the packages list below:

"react-native-fast-tflite": "^1.6.1",
"react-native-vision-camera": "^4.6.4",
"react-native-worklets-core": "^1.5.0",
"vision-camera-resize-plugin": "^3.2.0"

I also looked CMakeLists.txt and found related lines:

find_library(
  TFLITE
  tensorflowlite_jni
  PATHS "./src/main/cpp/lib/litert/jni/${ANDROID_ABI}"
  NO_DEFAULT_PATH
  NO_CMAKE_FIND_ROOT_PATH
)

find_library(
  TFLITE_GPU
  tensorflowlite_gpu_jni
  PATHS "./src/main/cpp/lib/litert/jni/${ANDROID_ABI}"
  NO_DEFAULT_PATH
  NO_CMAKE_FIND_ROOT_PATH
)

Seems like "lib/litert/jni/${ANDROID_ABI}" doesn't exist inside "./src/main/cpp/"

The source code I create is in https://github.com/tseng91301/robot-core-adv/tree/image-detection-using-3rd-party-package , maybe some modules conflicted? The error risen after installing react-native-worklets-core into the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions