0

I am trying to install ZBar Android SDK in Android Studio. My min supported API version is 22. I have tried methods in this and this question. Both methods resulted in various different errors when calling new ImageScanner(). I kind of just hacked it together because there's no guide on how to install it in Android Studio.

This is my directory structure:

app/jniLibs/armeabi

app/jniLibs/armeabi-v7a

app/jniLibs/x86

app/libs/zbar.jar

I get the following error when I run ImageScanner scanner = new ImageScanner()

java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.example.aramesh.zbartestapp-1/lib/arm/libzbarjni.so: has text relocations
Community
  • 1
  • 1
aaa
  • 363
  • 4
  • 15
  • It was updated in 2012, before Android Studio was really common, so what makes you think it will work? – OneCricketeer Jan 17 '17 at 21:24
  • @cricket_007 okay..well what is the alternative then? – aaa Jan 17 '17 at 21:26
  • What are you trying to do? Barcode scanning? I've had limited success with Zxing library – OneCricketeer Jan 17 '17 at 21:33
  • @cricket_007 yeah barcode scanning plus some OpenGL on top of that. Zxing had too much UI stuff I didn't need – aaa Jan 17 '17 at 21:35
  • Alright, well, please clarify how you "hacked" it together and the error messages you see. As far as I can tell, you include the JAR in `libs`, and you move the other files into a `jniLibs` folder, which Gradle picks up – OneCricketeer Jan 17 '17 at 22:01
  • @cricket_007 yeah that's exactly what I did, updated the OP with more information (sorry for the ambiguity) – aaa Jan 17 '17 at 22:04
  • Since it is looking at `lib/arm`, that is dependent upon the CPU of the device. – OneCricketeer Jan 17 '17 at 22:16

0 Answers0