Interactive Ink

java.lang.UnsatisfiedLinkError: JNI_ERR

The release version of the my application throws an error after running, the application adds proGuard,  it could run normally if not add or BuildVariant is debug.


  java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/com.eningqu.aipen-otgcDn8WTM2cl-5wm6RVTw==/lib/arm64/"

        at java.lang.Runtime.loadLibrary0(

        at java.lang.System.loadLibrary(

        at com.myscript.iink.m.b(

        at com.myscript.iink.m.<clinit>(

        at com.myscript.iink.m.a(Unknown Source:0)

        at com.myscript.iink.NativeFunctions.<clinit>(

        at com.myscript.iink.NativeFunctions.createEngine(Native Method)

        at com.myscript.iink.h.<init>(

        at com.myscript.iink.h.a(

        at com.eningqu.aipen.e.b.d(

        at com.eningqu.aipen.e.b.a(

        at com.eningqu.aipen.SmartPenApp.c(

        at com.eningqu.aipen.SmartPenApp.onCreate(



        at Source:0)


        at android.os.Handler.dispatchMessage(

        at android.os.Looper.loop(


        at java.lang.reflect.Method.invoke(Native Method)



app build.gradle

defaultConfig {


        ndk {

            abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'



buildTypes {

        release {

            minifyEnabled true

            shrinkResources true

            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

// signingConfig signingConfigs.release


        debug {

            minifyEnabled false

            shrinkResources false

            signingConfig signingConfigs.NQ

            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''



Dear Chad li,

Thank you for your request.

This error is most likely due to the fact some iink sdk classes call methods from the Java Native Interface (JNI), so the iink sdk code should be kept.

To fix this issue, add a -keep line in the ProGuard rules file for the com.myscript.iink package to make sure the corresponding code is kept.

Best Regards,


Thanks for your answer,the problem has been resolved

Login or Signup to post a comment