Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV-2.4.2-android-sdk requires build.xml?

I am following the tutorial at http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_binary_package_using_with_NDK.html#android-binary-package-with-ndk and found that I have to work round some odd problems. I am using an Android 4.0.3 target and developing on Ubuntu 12.04, I have android-ndk-r8b and am using Android 4.0.3 API 15. I am using Async initialization OpenCV Manager Android service to get OpenCV libraries on the target device. The NDK samples I have tried seem to work ok but all the OpenCV samples fail on the target with either - E/Sample::SurfaceView(1724): Can't open camera! OR

E/CAMERA_ACTIVITY(2076): Could not read /proc/self/smaps 08-16 21:29:33.817: D/CAMERA_ACTIVITY(2076): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.NativeCamera/lib/ 08-16 21:29:33.817: E/CAMERA_ACTIVITY(2076): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library 08-16 21:29:33.817: E/CV_CAP(2076): Native_camera returned opening error: 4 08-16 21:29:33.825: E/Sample-ImageManipulations::SurfaceView(2076): Failed to open native camera

I dropped back to command line from Eclipse to try and work out what in the environment was failing and I get an error .../android-sdk-linux/tools/ant/build.xml:569: Invalid file: .../OpenCV-2.4.2-android-sdk/sdk/java/build.xml because OpenCV-2.4.2-android-sdk/sdk/java/build.xml does not exist in the released sdk

Following appears to works ok: android update project -p . -s --target 1 ndk-build -B V=1

But then ant debug fails - [dependency] API<=15: Adding annotations.jar to the classpath. [echo] ---------- [echo] Building Libraries with 'debug'...

BUILD FAILED .../android-sdk-linux/tools/ant/build.xml:569: Invalid file: .../OpenCV-2.4.2-android-sdk/sdk/java/build.xml

Eclipse does not show this error so I am not sure what is going on or how best to tackle this problem... Perhaps I should build OpenCV with my environment - that surely would create /OpenCV-2.4.2-android-sdk/sdk/java/build.xml

OpenCV-2.4.2-android-sdk requires missing build.xml?

I am following the tutorial at http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_binary_package_using_with_NDK.html#android-binary-package-with-ndk and found that I have to work round some odd problems. I am using an Android 4.0.3 target and developing on Ubuntu 12.04, I have android-ndk-r8b and am using Android 4.0.3 API 15. I am using Async initialization OpenCV Manager Android service to get OpenCV libraries on the target device. The NDK samples I have tried seem to work ok but all the OpenCV samples fail on the target with either - E/Sample::SurfaceView(1724): Can't open camera! OR

E/CAMERA_ACTIVITY(2076): Could not read /proc/self/smaps 08-16 21:29:33.817: D/CAMERA_ACTIVITY(2076): CameraWrapperConnector::connectToLib: folderPath=/data/data/com.NativeCamera/lib/ 08-16 21:29:33.817: E/CAMERA_ACTIVITY(2076): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library 08-16 21:29:33.817: E/CV_CAP(2076): Native_camera returned opening error: 4 08-16 21:29:33.825: E/Sample-ImageManipulations::SurfaceView(2076): Failed to open native camera

I dropped back to command line from Eclipse to try and work out what in the environment was failing and I get an error .../android-sdk-linux/tools/ant/build.xml:569: Invalid file: .../OpenCV-2.4.2-android-sdk/sdk/java/build.xml because OpenCV-2.4.2-android-sdk/sdk/java/build.xml does not exist in the released sdk

Following appears to works ok: android update project -p . -s --target 1 ndk-build -B V=1

But then ant debug fails - [dependency] API<=15: Adding annotations.jar to the classpath. [echo] ---------- [echo] Building Libraries with 'debug'...

BUILD FAILED .../android-sdk-linux/tools/ant/build.xml:569: Invalid file: .../OpenCV-2.4.2-android-sdk/sdk/java/build.xml

Eclipse does not show this error so I am not sure what is going on or how best to tackle this problem... Perhaps I should build OpenCV with my environment - that surely would create /OpenCV-2.4.2-android-sdk/sdk/java/build.xml