Ask Your Question
0

Making Android SDK Error

asked 2016-08-10 17:19:29 -0500

updated 2016-08-11 00:28:26 -0500

berak gravatar image

when i make android sdk with opencv i get this error.

C:\Windows\system32>c:/python27/python "C:/Users/Hafiz Muhammad Imran/Downloads/Compressed/opencv-master/opencv/platforms/android/build_sdk.py" build_dir f:/opencv
Args: Namespace(build_doc=False, extra_modules_path=None, extra_pack=None, ndk_path=None, no_ccache=False, opencv_dir='f:/opencv', sdk_path=None, sign_with=None, work_dir='build_dir')
Android NDK path: C:\android-ndk-r10e\
Android SDK path: C:\Android\sdk\platform-tools\
Check dir C:\Windows\system32\build_dir (create: True, clean: False)
Check dir f:\opencv (create: False, clean: False)
Check dir C:\Windows\system32\build_dir\o4a (create: True, clean: True)
Removing file: C:\Windows\system32\build_dir\o4a\CMakeCache.txt
Removing dir: C:\Windows\system32\build_dir\o4a\CMakeFiles
Check dir C:\Windows\system32\build_dir\javadoc (create: True, clean: True)
Check dir C:\Windows\system32\build_dir\OpenCV-android-sdk (create: True, clean: True)
Detected OpenCV version: 3.1.0-dev
Detected Engine version: 3.10
Check dir C:\Windows\system32\build_dir\build_service_armeabi-v7a (create: True, clean: True)
=====
===== Building library for armeabi-v7a (arm-linux-androideabi-4.8)
=====
Executing: ['cmake', '-GNinja', "-DCMAKE_TOOLCHAIN_FILE='f:\\opencv\\platforms\\android\\android.toolchain.cmake'", '-DWITH_OPENCL=OFF', '-DWITH_CUDA=OFF', '-DWITH_IPP=OFF', '-DBUILD_EXAMPLES=OFF', '-DBUILD_TESTS=OFF', '-DBUILD_PERF_TESTS=OFF', '-DBUILD_DOCS=OFF', '-DBUILD_ANDROID_EXAMPLES=ON', '-DINSTALL_ANDROID_EXAMPLES=ON', '-DANDROID_STL=gnustl_static', '-DANDROID_NATIVE_API_LEVEL=9', "-DANDROID_ABI='armeabi-v7a with NEON'", '-DWITH_TBB=ON', '-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.8', 'f:\\opencv', '-DNDK_CCACHE=ccache', '-DBUILD_TESTS=ON', '-DINSTALL_TESTS=ON']
CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
  File "C:/Users/Hafiz Muhammad Imran/Downloads/Compressed/opencv-master/opencv/platforms/android/build_sdk.py", line 305, in <module>
    builder.build_library(abi, do_install)
  File "C:/Users/Hafiz Muhammad Imran/Downloads/Compressed/opencv-master/opencv/platforms/android/build_sdk.py", line 148, in build_library
    execute(cmd)
  File "C:/Users/Hafiz Muhammad Imran/Downloads/Compressed/opencv-master/opencv/platforms/android/build_sdk.py", line 20, in execute
    raise Fail("Child returned: %s" % retcode)
__main__.Fail: Child returned: 1

My envoirment Variables are also set

Envoirment Variables Link

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-08-11 00:30:59 -0500

berak gravatar image

you additionally need to install the ninja build tool .

just make sure, it's on the PATH, so python / cmake can access it.

edit flag offensive delete link more

Comments

After download ninja build tool still same issue. ninja.exe not running on my pc then i entered ninja.exe path in my Path variable but still same issue. @berak

immi jee gravatar imageimmi jee ( 2016-08-11 08:58:28 -0500 )edit

try to open a console window and type ninja . if that does not work, you have to try again with the path or the install

berak gravatar imageberak ( 2016-08-11 09:00:59 -0500 )edit

CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage Configuring incomplete, errors occurred!

Still getting error. @berak can you please give me a favor??? Kindly build it at your pc and gave SDK to me. That will be really appreciable. Waiting for your kind reply.

immi jee gravatar imageimmi jee ( 2016-08-14 01:34:22 -0500 )edit

sorry, but i can't do that, no java or android sdk here.

berak gravatar imageberak ( 2016-08-14 01:50:41 -0500 )edit

@berak can you please guide me how to create .so files from opencv sdk.

immi jee gravatar imageimmi jee ( 2016-08-16 04:34:25 -0500 )edit

sorry, but again - i can't . see comment above

berak gravatar imageberak ( 2016-08-16 04:39:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-10 17:19:29 -0500

Seen: 1,035 times

Last updated: Aug 11 '16