Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target "VisionCameraTflite" links to target "ReactAndroid::reactnativejni" but the target was not found. #103

Closed
shreykul opened this issue Nov 7, 2024 · 5 comments

Comments

@shreykul
Copy link

shreykul commented Nov 7, 2024

After following the installation instructions, it is still not working and shows cmake error.
CMake Error at CMakeLists.txt:29 (add_library): C/C++: Target "VisionCameraTflite" links to target "ReactAndroid::reactnativejni" C/C++: but the target was not found. Perhaps a find_package() call is missing for C/C++: an IMPORTED target, or an ALIAS target is missing?

I'm using:
"react-native": "0.76.1",
"react-native-fast-tflite": "^1.4.0",

Copy link

Guten Tag, Hans here. This issue does not provide enough detailed information for us to help you. Please share the build logs from your development environment, such as Xcode or Android Studio, along with other relevant details about your setup. Also, remember to check our documentation carefully. If you want faster response times from mrousavy, consider sponsoring the project here. 🍻

Note: If you think I made a mistake by closing this issue, please ping @mrousavy to take a look.

@maintenance-hans maintenance-hans bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
@shreykul
Copy link
Author

shreykul commented Nov 7, 2024

The build log for the above error is:

`Task :app:externalNativeBuildCleanDebug FAILED
Clean react_codegen_Tflite-arm64-v8a, react_codegen_RNPermissionsSpec-arm64-v8a, appmodules-arm64-v8a
C/C++: CMake Error at /Users/shreyanshkulshrestha/Documents/CardScanner/android/app/build/generated/autolinking/src/main/jni/Android-autolinking.cmake:9 (add_subdirectory):
C/C++: add_subdirectory given source
C/C++: "/Users/shreyanshkulshrestha/Documents/CardScanner/node_modules/react-native-fast-tflite/android/build/generated/source/codegen/jni/"
C/C++: which is not an existing directory.
C/C++: Call Stack (most recent call first):
C/C++: /Users/shreyanshkulshrestha/Documents/CardScanner/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:86 (include)
C/C++: CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/shreyanshkulshrestha/Documents/CardScanner/android/app/build/generated/autolinking/src/main/jni/Android-autolinking.cmake:11 (add_subdirectory):
C/C++: add_subdirectory given source
C/C++: "/Users/shreyanshkulshrestha/Documents/CardScanner/node_modules/react-native-permissions/android/build/generated/source/codegen/jni/"
C/C++: which is not an existing directory.
C/C++: Call Stack (most recent call first):
C/C++: /Users/shreyanshkulshrestha/Documents/CardScanner/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:86 (include)
C/C++: CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/shreyanshkulshrestha/Documents/CardScanner/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:89 (target_link_libraries):
C/C++: Cannot specify link libraries for target "react_codegen_Tflite" which is
C/C++: not built by this project.
C/C++: Call Stack (most recent call first):
C/C++: CMakeLists.txt:31 (include)
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed

ninja: error: rebuilding 'build.ninja': subcommand failed`

@mrousavy Please check if it is my issue or if the package is not working with the newest version of react native correctly, I've tried other solutions for the other issues but they were different and I didn't find any issue with cmake file in earlier issues.

@babldev
Copy link

babldev commented Nov 19, 2024

Looks very similar to the issue mrousavy/react-native-vision-camera#3260 fixed with mrousavy/react-native-vision-camera#3263

@babldev
Copy link

babldev commented Nov 19, 2024

Similar fix in the works here #108

@KDLPro
Copy link

KDLPro commented Nov 27, 2024

Is there any plans to push this commit ASAP @babldev @mrousavy on a new update? I'm currently using Expo to build the app and I have some issues that pushing this commit is necessary to run their online building modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants