Newland N950 POS SDK — UnsatisfiedLinkError on release build in Flutter plugin (extracted from system APK)

1 day ago 2
ARTICLE AD BOX

I'm building a Flutter app for the Newland N950 POS device that needs to print receipts using the device's built-in thermal printer. Since Newland doesn't publicly distribute their SDK, I extracted the classes from the system app (com.newland.detectapp) using dex2jar and am using nsdk.jar in my custom Flutter Android plugin.

**It works perfectly in debug mode but crashes in release mode.

What I did:**

Extracted base.apk from com.newland.detectapp via ADB

Converted classes.dex to nsdk.jar using dex2jar

Added the jar to my Flutter plugin's android/libs/

Used compileOnly fileTree(dir: 'libs', include: ['*.jar']) in build.gradle

Calling PosControllerImpl.getPosController(context) and ttfPrint(script, handler, 6, 1)

java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/.../mn.inspector.lite.mostparking-.../lib/arm/libSelfNdkApi.so" at java.lang.Runtime.loadLibrary0(Runtime.java:1077) at com.newland.cmdmanager.NdkApi.<clinit>(Unknown Source:2)
Read Entire Article