java.lang.UnsatisfiedLinkError has unexpected e_machine: 40
Asked Answered
S

3

5

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)
Sonata answered 17/4, 2017 at 7:22 Comment(0)
H
6

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

Hilburn answered 6/6, 2018 at 3:14 Comment(1)
this saves my day. on android x86 9.0, the menu for configuring Enable Native Bridge is under Android x86 Options.Protoactinium
S
1

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"
        }
Spitler answered 17/4, 2017 at 7:26 Comment(4)
Thanks for your response. I had to create a gradle.properties file. But it doesnt change anything. Do you have any other ideas?Sonata
no need to create gradle.properties if you are using androd studio. Its already exists in project structureSpitler
sure what part do you want me to post?Sonata
@Spitler not working for me still can't find .so file with System.loadLibrary("ffmpeg"); iknw every thing is correct but it's device architecture problemIona
C
1

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

Chino answered 14/9, 2017 at 3:10 Comment(1)
how to do it. plz help?Ironsmith

© 2022 - 2024 — McMap. All rights reserved.