OpenCV4Android and IntelliJ IDEA

I've been trying to compile OpenCV for android samples ( under IntelliJ IDEA with no success. With Eclipse it works out ok, sometimes it gives me error which I solve by right-clicking on eclipse project (Android Tools -> Fix Project Propeties).

Is there anyone who was able to compile them under IDEA?



I know this is a year after the fact, but can you please elaborate on how you solved this?


First of all, unzip the "OpenCV-2.4.9-android-sdk" (use the version you prefer) into a folder.
Open up inside IntelliJ the android sample you want to compile with OpenCV.

Then go to File->Import module

and select "OpenCV-2.4.9-android-sdk\sdk\java" folder.
Select "Import module from external model" with Eclipse option.

This will import module inside your project. Now you need to tell Intellij that your project depends on the OpenCV library.

To do so, go to File->Project structure..
Under Project Settings Tab, select Modules, than select your sample project. Than on the "Dependencies" tab of your project, press the green arrow on the right (Add), than add Module dependencies.

On the window that appears, just select the newly imported "OpenCV library 2.4.9" and that's it.



Did everything as you wrote, does not work.

What's my mistake?



Please sign in to leave a comment.