java.lang.UnsatisfiedLinkError has unexpected e_machine: 40

user2270079 picture user2270079 · Apr 17, 2017 · Viewed 10.3k times · Source

I am trying to use the ePOS-Print SDK for Android.

It works fine on ARM Devices. Just not on x86 Devices.

Is the Library only working on ARM Devices or is there a way to make it work on x86 Devices?

04-17 09:11:53.390 10989-12211/at.test.test E/art: dlopen("/data/app/test.test-2/lib/x86/libeposprint.so", RTLD_LAZY) failed: dlopen failed: "/data/app/at.test.test-2/lib/x86/libeposprint.so" has unexpected e_machine: 40

Process: at.calyx.calyxpos, PID: 10989
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/at.test.test/lib/x86/libeposprint.so" has unexpected e_machine: 40
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:989)
at com.epson.eposprint.Builder.<clinit>(Builder.java:17)

Answer

Dan M picture Dan M · Jun 6, 2018

I had a very similar error by trying to run an ARM app on Android x86. I was able to bypass it by installing libhoudini:

  1. On Android: Settings -> Apps Compatibility -> Enable Native Bridge
  2. Start Terminal Emulator (or press Alt-F1)
  3. Login as root: su -
  4. Run cd ~ /system/bin/enable_nativebridge
  5. Verify success by inspecting logs: logcat -T 10
  6. Reboot and re-install your ARM apps

More details