IntelliJ IDEA, import OpenCV Library
Answered
Hi,
Microsoft Windows 10.0 Build 10240
IntelliJ IDEA Community Edition 2016.3.5(64)
OpenCV 3.2.0 for Android
How to import OpenCV into IntelliJ IDEA?
Is static linking possible?
Thanks.
Please sign in to leave a comment.
What do you mean by static linking? The library contains of 2 parts, jars and native code. You just add it to the module dependencies: http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html.
Ensure the native libraries are in PATH, added into dependencies or their path is specified via -Djava.library.path=... when running.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206184119-OpenCV4Android-and-IntelliJ-IDEA?page=1
Did everything as you wrote, does not work.
What's my mistake?
Thanks.
The warning message clearly states what's the problem. You can't have non-Gradle Java module and Android-Gradle module in the same project.
If your project is Gradle based, dependency should be added via Gradle (via jar dependency, not via Java module dependency).
>> What do you mean by static linking?
Without the support of OpenCV Manager (App).
Importing from Eclipse (Default OpenCV Project).
http://stackoverflow.com/questions/17767557/how-to-use-opencv-in-android-studio-using-gradle-build-tool
Previously, I used this material: http://answers.opencv.org/question/14546/how-to-work-with-opencv4android-in-android-studio/
https://github.com/ctodobom/OpenCV-3.1.0-Android might be easier.
Thank you! How to be with static linking?
No idea, ask on OpenCV forums. As far as I can see this approach doesn't require the manager app.