EPSON问题,找不到“ libepos2.so”

时间:2018-09-03 11:59:13

标签: android fatal-error thermal-printer epson

在我将mSwipe(Card Swiper)与Android应用程序集成之前,EPSON网络打印机一直运行良好。

现在集成后,mSwipe可以正常工作,但是有关EPSON的所有信息都崩溃了。

libepos2.sosrc/main/jniLibs/armeabi/libepos2.so中,但仍然显示找不到。

log下面

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)

任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:1)

将此添加到您的应用级gradle文件中,清理,重建并重试。

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

答案 1 :(得分:1)

已解决::我还有.so内有更多app/libs/armeabi个文件。

所以,我将它们移到了app/src/main/jniLibs(就像下面的图片一样)

EPSON provided data

此外,在Gradle内的应用程序级别defaultconfig{}中的代码下方

ndk {
            abiFilters "armeabi"
        }

还有

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

这就像魅力。