user2270079
user2270079

Reputation: 127

java.lang.UnsatisfiedLinkError has unexpected e_machine: 40

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)

Upvotes: 5

Views: 15010

Answers (3)

Dan M
Dan M

Reputation: 1272

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

Upvotes: 6

Louis Nguyen
Louis Nguyen

Reputation: 345

I think you need build "libeposprint.so" file for x86.

Upvotes: 1

Reena
Reena

Reputation: 1378

I think this will help you

Put in gradle.properties this line

android.useDeprecatedNdk=true;

and in app/build.gradle this line in defaultConfig field

   ndk {
                abiFilters "armeabi", "armeabi-v7a","x86"
        }

Upvotes: 1

Related Questions