1

I am using scanlibrary module in my project and it works fine, but when I include tess-two 6.0.4 in build.gradle file it generates following error:

java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime

nativeLibraryDirectories=[/data/app/com.scanner.demo-1/lib/arm64, /data/app/com.scanner.demo-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libopencv_java3.so"

When I comment out compile 'com.rmtheis:tess-two:6.0.4' from the build.gradle file, app works fine again.

Is it a compatibility issue or I am doing something wrong.

My Project Structure:

Image

Shahrukh Haider
  • 454
  • 2
  • 16
  • After wasting a day i finally solved it. The "arm64-v8a" file generated by open-cv library is not present in tess-two library. So i used this in my app build.gradle file to exclude the particular folder. abiFilters "armeabi-v7a", "x86", "armeabi", "mips" – Shahrukh Haider Nov 12 '16 at 08:06

1 Answers1

3

I used "abiFilters" in app's build.gradle file to solve the issue.

defaultConfig{ ******** ndk{ abiFilters "armeabi-v7a", "x86", "armeabi", "mips" } }

If your project structure look different you might also try this

Community
  • 1
  • 1
Shahrukh Haider
  • 454
  • 2
  • 16
  • Nice solution. The problem is that the shared object files for 64-bit ABIs (arm64-v8a, mips64, x86_64) are present in tess-two, but absent in scanlibrary. This solution successfully works around the problem by filtering to only use the specified ABIs. – rmtheis Nov 15 '16 at 15:47