ANDROID NDK ERROR with OPENCV - android

I am new to android programming. Certain situations lead me directly to a project with real time image processing. I am trying to use OPENCV library, but eclipse shows the following error:
18:15:30 **** Build of configuration Default for project OpenCV Sample - 15 puzzle ****
"E:\\AND_NDK\\android-ndk-r10d\\ndk-build.cmd" all
Android NDK: WARNING: APP_PLATFORM android-15 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml
Android NDK: LOCAL_MODULE definition in jni/Android.mk must not contain space
E:/AND_NDK/android-ndk-r10d/build/core/build-shared-library.mk:23: *** Android NDK: Please correct error. Aborting . Stop.
How could I solve this?

It seems you have spaces on jni/Android.mk, which seems to be incorrect. You should try removing those blank spaces.
You might want to take a look at the following question too: installing android OpenCV unable to locate error while building

Related

Build CommonCrypto from source?

My client is requesting I package CommonCrypto inside their app and not use the version supplied by the OS.
I haven't found any pre-built distributions, but I found the source code (sans build instructions). Is there a simple way to build from source?
I tried using ndk-build, but I see the following error:
Android NDK: ERROR:Android.mk:corecrypto: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /SWE/release/Software/Harissa/Updates/BuiltHarissa/Roots/corecrypto/prebuilts/armeabi-v7a/libcorecrypto.so exists or that its path is correct
/Users/rajohns/Library/Android/sdk/ndk/21.0.6113669/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
And as seen in the Android.mk file, the corecrypto module does in fact point to an unknown /SWE/release/Software/Harissa/Updates/BuiltHarissa/Roots/corecrypto directory.

Android NDK:Aborting

I have installed ndk correctly when working with previous projects.I have downloaded now openpeer library for Android. When I load the openpeer sdk, I get the following:
14:59:28 ** Clean-only build of configuration Default for project openpeer-android-sdk **
"D:\android-ndk-r8e\ndk-build.cmd" NDK_DEBUG=1 clean
2 [main] pwd 4928 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer. Please report this problem to
the public mailing list cygwin#cygwin.com
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /cygdrive/d/Android Workspace/openpeer-android-sdk/jni/Android.mk
D:/android-ndk-r8e/build/core/add-application.mk:165: * Android NDK: Aborting... . Stop.
14:59:28 Build Finished (took 330ms)
I also got an error in the project but all of the files appear without any error signs. Please advise
I think you have a problem with the NDK_PROJECT_PATH environment variable..
Are you compiling over cygwin? what is the cygwin connection?
He tries to find some file at this path : /cygdrive/d/Android Workspace/openpeer-android-sdk/jni/Android.mk

i can't get opencv to work in android

I'm using eclipse to write android programs and i can successfully run them on adt but recently i had to write a program that uses opencv but i can't get opencv to work with android i got ndk and add it to system variables and also downloaded opencv4android sdk from this link: http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html and i imported all the examples now i get numerous error for any of the examples and when i click project->clean->clean all it comes up with following error :
C:\Documentation_Android\android-ndk-r9d-windows-x86_64\android-ndk-r9d\ndk-build.cmd
Android NDK: WARNING:jni/Android.mk:mixed_sample: non-system libraries
in linker flags: -lopencv_java Android NDK: This is likely to
result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library
dependencies of the Android NDK: current module
[armeabi-v7a] Install : libmixed_sample.so =>
libs/armeabi-v7a/libmixed_sample.so
I also tried Fix Project Properties but nothing happened and i tried to change jni/Application.mk and change armeabi-v7a to armeabi and that didn't helped too what should i do now ? is there anything I missing here ?
have you added LOCAL_LDLIBS in android.mk file?
LOCAL_LDLIBS := $(LOCAL_PATH)/jniLibs/libmixed_sample.so //path of .so file
OK i found the answer ! How stupid I am ! i just have to go to opencv library project properties in android tab select project build target as android 4.2.2 and everything worked well

Could not build OpenCV Android sample project

I'm trying to build the OpenCV Android sample projects. I added the "OpenCV Library - 2.4.8" as a project to eclipse and trying to build "OpenCV Sample - 15 Puzzle" sample project. When I build the lsample project It gives me the following error.
make: *** Android NDK: Aborting...
It prints the following in the console.
**** Clean-only build of configuration Default for project OpenCV Sample - 15 puzzle ****
D:\ProgramFiles\android-ndk-r9c\ndk-build.cmd clean
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 14 in ./AndroidManifest.xml
D:/ProgramFiles/android-ndk-r9c/build/core/add-application.mk:187: *** Android NDK: Aborting... . Stop.
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk
In the imported sample project I do not have a Android.mk file. Do I have to include such a file in this sample project? Could somebody please help me to fix this issue? I'm using Windows 8, Eclipse Juno provided in ADT bundle and these are the OpenCV 2.4.8 sample projects.
You will have to create Android.mk and Application.mk file. Refer to tutorial-2-mixedprocessing which comes along with the samples.
I would suggest starting from the easiest sample code, ie, tutorial1.
The details of files that are to be compiled are present in Android.mk

OpenCV Android NDK: non-system libraries in linker error

This is the error I get, I followed different guides to install and run NDK but just couldn't manage it. Always a problem
20:58:58 **** Auto Build of configuration Default for project OpenCV Sample - face-detection ****
"C:\\Users\\Gok2\\workspace\\android-ndk-r9b\\ndk-build.cmd"
Android NDK: WARNING:jni/Android.mk:detection_based_tracker: non-system libraries in linker flags: -lopencv_java
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi-v7a] Install : libdetection_based_tracker.so => libs/armeabi-v7a/libdetection_based_tracker.so
It's a warning, not an error. This warning has been introduced recently, in the latest release of NDK. The OpenCV build scripts have not yet accomodated the necessary workarounds, but I have no doubt the fix will be ready quite soon.
In the mean time, you can ignore the warning. I would advise to keep your eye on it, so that except for opencv libraries, no unexpected names appear in the build log.

Categories

Resources