Im trying to use face dection code of opencv on android
but there are some problems even i clean the project like the others said.
here is the description on the eclipse
The project cannot be built until build path errors are
resolved OpenCV Sample - color-blob-detection Unknown Java Problem
The container 'Android Dependencies' references non existing library
'C:\OpenCV-2.4.3-android-sdk\sdk\java\bin\opencv library -
2.4.3.jar' OpenCV Sample - color-blob-detection Build path Build Path Problem
Its mostly a problem with the path.
Have you checked the path correctly? (Jones suggestion should work for you)
If its correctly set... I would ask you to check the make file in JNI folder and use this full path, and also check the build path -> C++ -> GNU C++ -> add this path (if not already added).
Then you should be able to get this to work.
There isn't any .jar to import.
If you follow openCV tutorial (http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html)
and import all Samples and Library you should be sure that Library project can be built without error.
In my case I have just set the Android Target at the current release 5.1.1.
To do that, right click on project "OpenCV Library - 2.4.11"->Properties->Android->Select Android 5.1.1->Apply
Related
I already watched so many tutorials online but I can't figure out what's wrong with the sample projects given by the openCv.
I also follow the steps given in this link : sample question
The error in 15 puzzle is different from camera-calibration and color-blob-detection.
After I deleted the error lines in JavaCameraView.java file, some of the samples start to works fine.
My ndk version is r10 and OpenCV version is 2.4.9. I hope someone can help me solve my problem. Thanks in advance!
You can look at this sample. Basically you will just need to redirect the library to your folder
After some configurations, I finally figured out how to solve my problem. Here are the steps:
First: Click on every folder->Properties->Android->Delete the unknown reference then add the OpenCV library.
Second: Make sure to link the C/C++ Build by Properties-> C/C++ Build-> Then copy the file path of your ndk folder
Third:copy jni folder present in face detection or other projects then paste it to a project that don't have a jni folder.
Fourth: Change the include declaration to local library of OpenCV.mk in Android.mk file.
Ex. include C:/Dev/OpenCV-2.4.9-android-sdk/OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCV.mk
Fifth:Make sure to clean and build the project.
Finally run every project on your device. cherio!
I am trying to build an NDK project but I am facing an error. The reverse function couldn't be resolved in a project using JNI with NDK Android, which you can see in the attached image.
I have added the path in project properties at path and symbols section --->see screenshot for this too.
After importing opencv-android-sdk library project into workspace, it shows so many errors.
I tried following tutorial
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
But i am not getting
....\sdk\java
under Library section as picture showing in step 2 in tutorial.
(Sorry I am allowed to post image here.)
Is there any problem with my java.
I am using Ubuntu 13.04 with Eclipse Version: 3.8.1 and OpenCV-2.4.6-android-sdk
Check your project build properties, change the OpenCV import path to the correct one (make sure the path of opencv relative to your application matches what you place in import path).
I'm trying to get ActionBarSherlock and the ViewPagerIndicator libraries set up for my projects, but I seem to be running into a few issues. I sent Jake Wharton (The developer) a few messages earlier about it, and got a few replies but couldn't get anywhere - and I think he got busy with a few other things.
What my issue is, For both VPI and ABS
Both libraries open up without any errors, and I'm using compiler version 1.6 for all as is required.
The funny thing is, if I load in the samples that are provided - they work fine and link to his library; but when I go to add the library to my project - the above happens.
Where to store the actual library project does not matter, as long as you use a relative link to reference it. Check out the Library Projects - Development considerations:
Library project storage location
There are no specific requirements on where you should store a library project, relative to a dependent application project, as long as the application project can reference the library project by a relative link. What is important is that the main project can reference the library project through a relative link.
You should always use the Eclipse ADT plugin to select and set up Library Project Reference, i.e. right-click project -> Properties -> Android -> Add, then in the opened Project Selection window, select the Library Project list here (of cause you should import them in the same Eclipse workspace as your Main Project). This will add a android.library.reference using relative path into project.properties as well as show relative path in the Android preference window:
android.library.reference.2=../../../../../Documents and Settings/yorkw/Desktop/JakeWharton-Android-ViewPagerIndicator-f09acb0/library
If you directly alter it using absolute path from project.properties as below:
android.library.reference.1=C:\\Documents and Settings\\yorkw\\Desktop\\JakeWharton-Android-ViewPagerIndicator-f09acb0\\library
Then after Eclipse refresh your project, you get the exact error described in your question, see my screenshot below:
Hope this helps.
While importing the libraries, make sure that you tick the "Copy projects int workspace" check box. The library projects need to be in the same workspace for them to work.
delete and import the project and lib again. build the lib project , add lib to project, still error shows.. rename the lib project. this worked for me ....
I have made modifications to several example OpenCV projects within Android, however I am having some issues with using OpenCV successfully in a new Android project.
The documentation on using OpenCV with Android says to complete the following steps to add OpenCV to an Android project -
ensure the Android project is in the same workspace as OpenCV
add a reference to the OpenCV project by going to Properties > Android > Library > Add and choosing the OpenCV Library project
I have followed both of these steps, however when I compile my application I receive the console error -
Could not find OpenCV-2.3.1.apk!
When creating a new Android project, the only thing you need to do is
add a reference to the OpenCV project by going to Properties > Android > Library > Add and choosing the OpenCV Library project
You should not then explicitly add OpenCV Library project into your new Android project's build path:
add another reference to the OpenCV project by going to Properties > Java Build Path > Projects > add...
If you do latter step, you will get the exact error Could not find OpenCV-2.3.1.apk! described in the question.
Check out the New Android project's build path and remove OpenCV project if it exists, then give it another try and see if this helps.
When you add OpenCV from Properties->Android->libarary->Add you need to leave "Is Library" checkbox unchecked. Go to Project->Properties->Android and uncheck "Is Library" and then try again. It should solve your issue (it did for me) but if it doesn't please take a look at the answers of this question as other people have found some other things to be helpful as well.
I had this problem when I pulled in the jni_part.cpp file from a sample project. I forgot to change the names of the functions to fit the package name of the class I was using them from:
JNIEXPORT void JNICALL Java_org_opencv_samples_tutorial3_Sample3Native_FindFeatures ->
JNIEXPORT void JNICALL Java_<CLASSNAME_WITH_UNDERSCORES_INSTEAD_OF_DOTS>_<CLASS_NAME>_<METHOD_NAME>
Hope this helps someone.