Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can not find Java folder in OpenCV build

I have built OpenCV for android on Windows using CMAKE, MINGW and NVIDIA Android NDK. After I make it and make install it, I found the following folders:

install:
 -apk:
 -sdk:
   --etc
   --native

there is no java folder inside the sdk folder. What did I miss?

Can not find Java folder in OpenCV build

I have built OpenCV for android on Windows using CMAKE, MINGW and NVIDIA Android NDK. After I make it and make install it, I found the following folders:

install:
 -apk:
 -sdk:
   --etc
   --native

there is no java folder inside the sdk folder. What did I miss?

EDIT (CMake output):

3rdparty
bin
carotene
CMakeCache.txt
CMakeConfig-ANDROID_CONFIGCMAKE.cmake
CMakeFiles
CMakeVars.txt
cmake_install.cmake
cmake_uninstall.cmake
CPackConfig.cmake
CPackSourceConfig.cmake
CTestTestfile.cmake
custom_hal.hpp
cvconfig.h
data
doc
include
install
install_manifest.txt
junk
lib
Makefile
modules
OpenCV-armeabi-v7a.mk
OpenCV.mk
opencv2
OpenCVConfig-version.cmake
OpenCVConfig.cmake
OpenCVModules.cmake
platforms
samples
unix-install
version_string.tmp

Can not find Java folder in OpenCV build

I have built OpenCV for android on Windows using CMAKE, MINGW and NVIDIA Android NDK. After I make it and make install it, I found the following folders:

install:
 -apk:
 -sdk:
   --etc
   --native

there is no java folder inside the sdk folder. libopencv_java3.so is also mssing. What did I miss?

EDIT (CMake output):

3rdparty
bin
carotene
CMakeCache.txt
CMakeConfig-ANDROID_CONFIGCMAKE.cmake
CMakeFiles
CMakeVars.txt
cmake_install.cmake
cmake_uninstall.cmake
CPackConfig.cmake
CPackSourceConfig.cmake
CTestTestfile.cmake
custom_hal.hpp
cvconfig.h
data
doc
include
install
install_manifest.txt
junk
lib
Makefile
modules
OpenCV-armeabi-v7a.mk
OpenCV.mk
opencv2
OpenCVConfig-version.cmake
OpenCVConfig.cmake
OpenCVModules.cmake
platforms
samples
unix-install
version_string.tmp

Can not find Java folder in OpenCV build

I have built OpenCV for android on Windows using CMAKE, MINGW and NVIDIA Android NDK. After I make it and make install it, I found the following folders:

install:
 -apk:
 -sdk:
   --etc
   --native

there is no java folder inside the sdk folder. libopencv_java3.so is also mssing. What did I miss?

EDIT (CMake output):

3rdparty
bin
carotene
CMakeCache.txt
CMakeConfig-ANDROID_CONFIGCMAKE.cmake
CMakeFiles
CMakeVars.txt
cmake_install.cmake
cmake_uninstall.cmake
CPackConfig.cmake
CPackSourceConfig.cmake
CTestTestfile.cmake
custom_hal.hpp
cvconfig.h
data
doc
include
install
install_manifest.txt
junk
lib
Makefile
modules
OpenCV-armeabi-v7a.mk
OpenCV.mk
opencv2
OpenCVConfig-version.cmake
OpenCVConfig.cmake
OpenCVModules.cmake
platforms
samples
unix-install
version_string.tmp
Detected version of GNU GCC: 49 (409)
FP16: Compiler support is available
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.4" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.2" (found C:/Python27/python.exe)
Found apache ant 1.8.2: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat
Assume that non-module dependency is available: z (for module opencv_core)
[OpenCV for Android SDK]: A new OpenGL Camera Bridge (CameraGLSurfaceView, CameraGLRendererBase, CameraRenderer, Camera2Renderer) is disabled, because ANDROID_SDK_TARGET (15) < 21
Sample example-tutorial-4-opencl is disabled, because ANDROID_OPENCL_SDK is not specified

General configuration for OpenCV 3.1.0-dev =====================================
  Version control:               3.1.0-1661-gacaa1e1

  Platform:
    Timestamp:                   2016-12-06T13:36:05Z
    Host:                        Windows 10.0.10586 AMD64
    Target:                      Android 1 armv7-a
    CMake:                       3.4.2
    CMake generator:             Unix Makefiles
    CMake build tool:            C:/PROGRA~2/GnuWin32/bin/make.exe
    Configuration:               Release

  C/C++:
    Built as dynamic libs?:      NO
    C++ Compiler:                C:/NVPACK/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe  (ver 4.9)
    C++ flags (Release):         -fexceptions -frtti -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -fvisibility-inlines-hidden -mfpu=neon-fp16 -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fexceptions -frtti -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -fvisibility-inlines-hidden -mfpu=neon-fp16 -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  C:/NVPACK/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe
    C flags (Release):           -fexceptions -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -mfpu=neon-fp16 -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fexceptions -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -mfpu=neon-fp16 -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-allow-shlib-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now 
    Linker flags (Debug):        -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-allow-shlib-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now 
    Precompiled headers:         NO
    Extra dependencies:          z dl m log
    3rdparty dependencies:       libjpeg libwebp libpng libtiff libjasper IlmImf tegra_hal

  OpenCV modules:
    To be built:                 core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres features2d calib3d java stitching videostab
    Disabled:                    ts world
    Disabled by dependency:      -
    Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 viz

  Android: 
    Android ABI:                 armeabi-v7a with NEON
    STL type:                    gnustl_static
    Native API level:            android-9
    SDK target:                  android-15
    Android NDK:                 C:/NVPACK/android-ndk-r12b (toolchain: arm-linux-androideabi-4.9)
    android tool:                C:/NVPACK/android-sdk-windows/tools/android.bat (Android SDK Tools, revision 25.2.3.)
    Google Play manager:         NO
    Android examples:            YES

  GUI: 
    GTK+:                        NO
    GThread :                    NO
    GtkGlExt:                    NO
    OpenGL support:              NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        z (ver 1.2.3)
    JPEG:                        build (ver 90)
    WEBP:                        build (ver 0.3.1)
    PNG:                         build (ver 1.6.24)
    TIFF:                        build (ver 42 - 4.0.2)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    GDAL:                        NO
    GDCM:                        NO

  Video I/O:

  Parallel framework:            pthreads

  Other third-party libraries:
    Use IPP:                     NO
    Use Eigen:                   NO
    Use Cuda:                    NO
    Use OpenCL:                  YES
    Use OpenVX:                  NO
    Use custom HAL:              YES (carotene (ver 0.0.1))

  OpenCL:                        <Dynamic loading of OpenCL library>
    Include path:                C:/opencv/3rdparty/include/opencl/1.2
    Use AMDFFT:                  NO
    Use AMDBLAS:                 NO

  Python 2:
    Interpreter:                 (ver 2.7.12)

  Python 3:
    Interpreter:                 NO

  Python (for build):            

  Java:
    ant:                         C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (ver 1.8.2)
    Java wrappers:               YES
    Java tests:                  YES

  Matlab:                        NO

  Documentation:
    Doxygen:                     NO
    PlantUML:                    NO

  Tests and samples:
    Tests:                       NO
    Performance tests:           NO
    C/C++ Examples:              NO

  Install path:                  C:/opencv/platforms/build_android_arm_new/install

  cvconfig.h is in:              C:/opencv/platforms/build_android_arm_new
-----------------------------------------------------------------

Configuring done
Generating done

Can not find Java folder in OpenCV build

I have built OpenCV for android on Windows using CMAKE, MINGW and NVIDIA Android NDK. After I make it and make install it, I found the following folders:

install:
 -apk:
 -sdk:
   --etc
   --native

there is no java folder inside the sdk folder. libopencv_java3.so is also mssing. What did I miss?

EDIT (CMake output):

Detected version of GNU GCC: 49 (409)
FP16: Compiler support is available
Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.4" (found C:/Python27/python.exe)
Could NOT find PythonInterp: Found unsuitable version "2.7.13", but required is at least "3.2" (found C:/Python27/python.exe)
Found apache ant 1.8.2: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat
Assume that non-module dependency is available: z (for module opencv_core)
[OpenCV for Android SDK]: A new OpenGL Camera Bridge (CameraGLSurfaceView, CameraGLRendererBase, CameraRenderer, Camera2Renderer) is disabled, because ANDROID_SDK_TARGET (15) < 21
Sample example-tutorial-4-opencl is disabled, because ANDROID_OPENCL_SDK is not specified

General configuration for OpenCV 3.1.0-dev =====================================
  Version control:               3.1.0-1661-gacaa1e1

  Platform:
    Timestamp:                   2016-12-06T13:36:05Z
    Host:                        Windows 10.0.10586 AMD64
    Target:                      Android 1 armv7-a
    CMake:                       3.4.2
    CMake generator:             Unix Makefiles
    CMake build tool:            C:/PROGRA~2/GnuWin32/bin/make.exe
    Configuration:               Release

  C/C++:
    Built as dynamic libs?:      NO
    C++ Compiler:                C:/NVPACK/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe  (ver 4.9)
    C++ flags (Release):         -fexceptions -frtti -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -fvisibility-inlines-hidden -mfpu=neon-fp16 -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fexceptions -frtti -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -fvisibility-inlines-hidden -mfpu=neon-fp16 -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  C:/NVPACK/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe
    C flags (Release):           -fexceptions -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -mfpu=neon-fp16 -mthumb -fomit-frame-pointer -fno-strict-aliasing -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fexceptions -fpic -Wno-psabi --sysroot=C:/NVPACK/android-ndk-r12b/platforms/android-9/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fdata-sections -ffunction-sections -Wa,--noexecstack    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -fomit-frame-pointer -mfp16-format=ieee -mfpu=neon -fvisibility=hidden -mfpu=neon-fp16 -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-allow-shlib-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now 
    Linker flags (Debug):        -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-allow-shlib-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now 
    Precompiled headers:         NO
    Extra dependencies:          z dl m log
    3rdparty dependencies:       libjpeg libwebp libpng libtiff libjasper IlmImf tegra_hal

  OpenCV modules:
    To be built:                 core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres features2d calib3d java stitching videostab
    Disabled:                    ts world
    Disabled by dependency:      -
    Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 viz

  Android: 
    Android ABI:                 armeabi-v7a with NEON
    STL type:                    gnustl_static
    Native API level:            android-9
    SDK target:                  android-15
    Android NDK:                 C:/NVPACK/android-ndk-r12b (toolchain: arm-linux-androideabi-4.9)
    android tool:                C:/NVPACK/android-sdk-windows/tools/android.bat (Android SDK Tools, revision 25.2.3.)
    Google Play manager:         NO
    Android examples:            YES

  GUI: 
    GTK+:                        NO
    GThread :                    NO
    GtkGlExt:                    NO
    OpenGL support:              NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        z (ver 1.2.3)
    JPEG:                        build (ver 90)
    WEBP:                        build (ver 0.3.1)
    PNG:                         build (ver 1.6.24)
    TIFF:                        build (ver 42 - 4.0.2)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    GDAL:                        NO
    GDCM:                        NO

  Video I/O:

  Parallel framework:            pthreads

  Other third-party libraries:
    Use IPP:                     NO
    Use Eigen:                   NO
    Use Cuda:                    NO
    Use OpenCL:                  YES
    Use OpenVX:                  NO
    Use custom HAL:              YES (carotene (ver 0.0.1))

  OpenCL:                        <Dynamic loading of OpenCL library>
    Include path:                C:/opencv/3rdparty/include/opencl/1.2
    Use AMDFFT:                  NO
    Use AMDBLAS:                 NO

  Python 2:
    Interpreter:                 (ver 2.7.12)

  Python 3:
    Interpreter:                 NO

  Python (for build):            

  Java:
    ant:                         C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (ver 1.8.2)
    Java wrappers:               YES
    Java tests:                  YES

  Matlab:                        NO

  Documentation:
    Doxygen:                     NO
    PlantUML:                    NO

  Tests and samples:
    Tests:                       NO
    Performance tests:           NO
    C/C++ Examples:              NO

  Install path:                  C:/opencv/platforms/build_android_arm_new/install

  cvconfig.h is in:              C:/opencv/platforms/build_android_arm_new
-----------------------------------------------------------------

Configuring done
Generating done

Edit: I am getting error while makeing the project:

Error copying file (if different) from "C:/opencv/platforms/build_android_arm_new/modules/java/gen/calib3d.cpp" to "C:/opencv/platforms/build_android_arm_new/jni/calib3d.cpp".
make[2]: *** [jni/calib3d.cpp] Error 1
make[1]: *** [modules/java/CMakeFiles/opencv_java.dir/all] Error 2
make: *** [all] Error 2