0

This question might seem too basic but I'm struggling a lot about this stuff, please help me or guide me.

I downloaded opencv (open source computer vision) libraries and I want Android Studio to be able to use those libraries.

I checked this answer also-How to use opencv in android studio using gradle build tool? but this answer talks about having opencv-android-sdk and nowadays I think opencv has not anything like opencv-android-sdk , so I couldn't follow that answer.

Now the main point is, what I downloaded and extracted has a folder named java , there is a opencv-320.jar file and two folder x86 and x64, x64 folder contains opencv_java320.dll file. I believe these two files are only files needed to get opencv libraries in Android Studio. But I don't know how it can be done. Please help me.

Community
  • 1
  • 1
  • where did you download those files? – Mehran Zamani Apr 09 '17 at 05:21
  • Android doesn't use .dlls. Dll are windows executable files. Android is a linux OS. You need to build .so files (which are the same type of thing, but a different file format). Also 99% of Android devices are ARM, not x86. So you need the arm .so files, not the x86 ones. – Gabe Sechan Apr 09 '17 at 05:57

1 Answers1

-1

You should not be using any dll or jar file that is not specifically for Android.

OpenCV has an Android version: http://opencv.org/platforms/android/

Follow the instructions and example there in order to use it.

theblitz
  • 6,683
  • 16
  • 60
  • 114
  • You an use almost any jar file in android (the only time you can't is if it uses Java 8 features or java standard library calls not in android. About 90% of non-GUI jars will work. – Gabe Sechan Apr 09 '17 at 05:57
  • "the only time you can't is if it uses Java 8 features or java standard library calls not in android" or in other words - is specifically for Android. – theblitz Apr 12 '17 at 12:12
  • Not at all. The vast majority of non-gui libraries will work – Gabe Sechan Apr 12 '17 at 12:32