Master_GoGo
Master_GoGo

Reputation: 1690

Issue with EPSON, couldn't find "libepos2.so"

EPSON network printer was working perfect until I integrated mSwipe(Card Swiper) with my Android App.

After integration now mSwipe working perfectly but everything about EPSON is crashing.

libepos2.so is there in src/main/jniLibs/armeabi/libepos2.so but still it says couldn't find.

log below:

FATAL EXCEPTION: main
    Process: com.intuition.dine.ivepos, PID: 10908
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.intuition.dine.ivepos-1/base.apk"],nativeLibraryDirectories=[/data/app/com.intuition.dine.ivepos-1/lib/arm, /data/app/com.intuition.dine.ivepos-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libepos2.so"
        at java.lang.Runtime.loadLibrary0(Runtime.java:972)
        at java.lang.System.loadLibrary(System.java:1567)
        at com.epson.epos2.discovery.Discovery.<clinit>(Discovery.java:20)
        at com.epson.epos2.discovery.Discovery.start(Discovery.java)
        at com.intuition.dine.ivepos.SearchIPActivity.onCreate(SearchIPActivity.java:191)
        at android.app.Activity.performCreate(Activity.java:6955)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
        at android.app.ActivityThread.-wrap14(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6776)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)

Any help would be appreciated.

Upvotes: 2

Views: 3616

Answers (3)

secret_cinema
secret_cinema

Reputation: 145

I tried everything in the answers here (and from other questions on stackoverflow), but the only fix for me was making a folder in app/src/main/jniLibs called armeabi-v7a and copying the so files from armeabi to it.

Upvotes: 2

Master_GoGo
Master_GoGo

Reputation: 1690

Solved : I have some more .so files which are inside app/libs/armeabi.

So, I moved them to app/src/main/jniLibs (Just like below Image)

EPSON provided data

Also, below code in app level Gradle inside defaultconfig{}

ndk {
            abiFilters "armeabi"
        }

And

android{
     splits {
        abi {
            enable true
            reset()
            universalApk true
        }
    }
}

This worked like charm.

Upvotes: 6

entropy.maximum
entropy.maximum

Reputation: 477

Add this to your app level gradle file, clean, rebuild and try again.

android {
    //Other stuff here
    splits {
        abi {
            enable true
            reset()
            universalApk true
            }
      }
}

Upvotes: 1

Related Questions