I am trying to get the OpenCV library working with android. I imported this library project into eclipse and made a new android project (the one I will develop) and just. I set the build path to include the OpenCV project in eclipse. However, when I run my new project, it says
[2014-10-13 19:41:57 - OpenCV Library - 2.4.10] Could not find OpenCV Library - 2.4.10.apk!
From what I understand, my new project should automatically pull in the library project and install it. I am wondering if I am missing any steps (because it doesn't seem to be pulling in the project)? Does it have to be the same target sdk? I am quite sure I followed all of the OpenCV installation guide and have no compile errors in the projects. Also if I load up the sample projects by directly installing the apks they seem to work fine. I even tried it with the OpenCV Manager app already installed but that didn't work either. Thanks for any help.
Just add the OpenCV library project as shown below, the problem will go.
Project -> Properties -> Android
and press OK.
You should check "Library" build option in Eclipse for OpenCV android project.(Not your project)
Clean your OpenCV library,build it again and check in OpenCv library->bin->opencv library -X.X.XX.jar if there is a file (X==> VERSION)(see picture).See this for .jar file. If this file does not exist then your library is not generated then check the video it might help This should help if your library is not built.
My personal experience:I wasn't able to generate the jar file for some reasons using OpenCv2.4.10 .If the same happens to you consider using OPENCVTEGRA library it works at least for me.
Answering 1st time. Hope this helps
Related
I have an Android app that uses OpenCV's Java wrapper for image processing. To add OpenCV to the project, I had to add the following line to gradle.properties:
android.useDeprecatedNdk=true
This had been working fine without any warnings or errors (that I know of) up until I updated my Android Studio and Gradle after a long time (I'm using Gradle 2.2.2 and Android Studio 2.2.2 now). Now when I build my app, I get the following warnings on the messages window:
Warning:Native C/C++ source code is found, but it seems that NDK
option is not configured. Note that if you have an Android.mk, it is
not used for compilation. The recommended workaround is to remove the
default jni source code directory by adding:
Warning:Deprecated NDK integration enabled by useDeprecatedNdk flag in
gradle.properties will be removed from Android Gradle plugin soon.
Even though the build is successful at this time, as the second warning informs, this is highly likely to cause some trouble in the future, so I want to resolve them as soon as possible before things go sideways.
Does anyone know how to get resolve these warnings? Or are there any other way to import OpenCV to an Android project, other than adding all the compiled code (the .so files) and setting the flag I mentioned earlier? Any help on this will be appreciated.
I would suggest to migrate over to using the native support with cmake. You could check the link which provides a step-by-step tutorial to add OpenCV using cmake via the following link.
You're code should stay the same without any changes, only necessary action is to figure out how to include them within the build process using CMakeLists.txt.
In the project pane, right click your app (in my React Native project it's the "app" catalog), and select "Link C++ project with gradle".
Now you must find the Android.mk file - it should be already generated in your_app/app/build/intermediates/ndk/debug/
I just add external jar(android support.v4.jar) to my project using eclipse IDE.
But it show empty packages.Can anyone guide me how to solve this.?
External jar show empty packages:
I just add external jar(android support.v4.jar) to my project using eclipse IDE.
Not quite. You added support-v4-23.1.1-sources.jar. The key part of that filename, with respect to your problem, is sources. This JAR contains Java source code, not compiled Java classes.
Can anyone guide me how to solve this.?
Google is no longer supporting Eclipse. There is no official distribution of any of the support libraries as simple JARs, or even Eclipse-style library projects.
The simple solution is to move to Android Studio, or possibly IntelliJ IDEA, instead of using Eclipse.
I found this "amazing" library that i think it would look nice in my small project but i don't find how to use it / how to install.
This is the url:
https://github.com/kmshack/Android-ParallaxHeaderViewPager
Thanks.
It seems to be available via Maven (see here). It might be an old version however. You could also import the project into Android Studio, build the jar and put it in your project's libs folder. A third option would be to make it build as part of your own project. For the latter you can use this for inspiration.
I am new in android. I see a lot of android libraries out there like github.com but when I download them none of them are a *.jar file like this one:
NumberProgressBar
It seems that all these libraries are for android studio NOT eclipse (Am I correct? This is important).
My question is: How do I use these libraries in eclipse?
I tried to import the downloaded library as an android project and then mark it as "is library" and then add to my project, but that did not work.
That library is designed to be built with Gradle for Android (with or without Android Studio), producing an AAR.
Eclipse does not have native AAR support. I have published a recipe and a Ruby script to convert an AAR into a library project that Eclipse can use, though I have not tested it much.
Or, you can download the source code and attempt to reorganize it into an Eclipse-style library project.
I just downloaded it and add it as library project and everything looks fine. How do you do it, it's extremely simple. Let us know in which step you have a problem so we can figure out what is wrong.
You have to build the library first.
For your example, read the Readme file, section 'Build'.
I want to work on an Android project (under Eclipse) using Opencv, I've imported the Opencv library and it's associated samples to Eclipse, as explained here:
http://opencv.itseez.com/doc/tutorials/introduction/android_binary_package/android_binary_package.html.
I tested the samples and they work well. But when I create my new own Android project in Eclipse, it can't link Opencv which is placed in the same workspace as the project (i.e. error when I write import org.opencv.core.*).
Is there something that has to be done for a new project to be linked with Opencv (src and lib)?
I recomend you to download the OpenCV prebuild package and follow these instructions.
I don't know if you are going to use C++ for openCV and crosscompile with NDK and JNI library, but that way is quite easy to set up everything. If you need more help about how including C++ OpenCV codes in android projects I can check my codes. Good luck.
It sounds like you haven’t included the Open CV library’s in your new project.
I can’t remember the exact step to include libraries in projects but below are a couple of link that might help.
http://wiki.eclipse.org/FAQ_How_do_I_add_an_extra_library_to_my_project's_classpath%3F
Import Libraries in Eclipse?