PoseEstimationForMobile icon indicating copy to clipboard operation
PoseEstimationForMobile copied to clipboard

android build for "demo_tflite" failed

Open rohanbhatia56 opened this issue 6 years ago • 5 comments

android build for "demo_tflite" failed on window 10 giving the following error:

Build command failed. Error while executing process C:\Users\rohanbhatia\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe with arguments {--build C:\Users\rohanbhatia\AndroidStudioProjects\demo_tflite\app.externalNativeBuild\cmake\debug\armeabi-v7a --target jupiter_opencv_320} [1/1] Linking CXX shared library ........\build\intermediates\cmake\debug\obj\armeabi-v7a\libjupiter_opencv_320.so FAILED: ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libjupiter_opencv_320.so cmd.exe /C "cd . && C:\Users\rohanbhatia\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi23 --gcc-toolchain=C:/Users/rohanbhatia/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/rohanbhatia/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -frtti -fexceptions -std=gnu++11 -fexceptions -frtti -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,-z,noexecstack -shared -Wl,-soname,libjupiter_opencv_320.so -o ........\build\intermediates\cmake\debug\obj\armeabi-v7a\libjupiter_opencv_320.so CMakeFiles/jupiter_opencv_320.dir/src/main/cpp/native-lib.cpp.o -landroid -llog ../../../../libs/armeabi-v7a/libopencv_java3.so ../../../../libs/armeabi-v7a/libopencv_calib3d.a ../../../../libs/armeabi-v7a/libopencv_core.a ../../../../libs/armeabi-v7a/libopencv_features2d.a ../../../../libs/armeabi-v7a/libopencv_flann.a ../../../../libs/armeabi-v7a/libopencv_highgui.a ../../../../libs/armeabi-v7a/libopencv_imgcodecs.a ../../../../libs/armeabi-v7a/libopencv_imgproc.a ../../../../libs/armeabi-v7a/libopencv_ml.a ../../../../libs/armeabi-v7a/libopencv_objdetect.a ../../../../libs/armeabi-v7a/libopencv_photo.a ../../../../libs/armeabi-v7a/libopencv_shape.a ../../../../libs/armeabi-v7a/libopencv_stitching.a ../../../../libs/armeabi-v7a/libopencv_superres.a ../../../../libs/armeabi-v7a/libopencv_video.a ../../../../libs/armeabi-v7a/libopencv_videoio.a ../../../../libs/armeabi-v7a/libopencv_videostab.a -llog -latomic -lm && cd ." ../../../../src/main/cpp/native-lib.cpp:35: error: undefined reference to 'cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::ndk1::vector<cv::Rect, std::ndk1::allocator<cv::Rect > >&, double, int, int, cv::Size, cv::Size)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed

rohanbhatia56 avatar Aug 01 '19 11:08 rohanbhatia56

@rohanbhatia56 Do you solve this?

panmin avatar Mar 20 '20 01:03 panmin

@rohanbhatia56 @panmin Do you solve this?

leung-yaya avatar May 01 '20 06:05 leung-yaya

@panmin nope

rohanbhatia-nag avatar May 01 '20 11:05 rohanbhatia-nag

i am stuck on this as well

septianpujis avatar May 26 '20 05:05 septianpujis

Do not use the latest version of NDK, try to use the version of NDK mentioned in the README which is NDK Version: r16 can be downloaded at https://developer.android.com/ndk/downloads/older_releases (16b) then rebuild your app

jasonakon avatar Aug 31 '20 03:08 jasonakon