java.lang.UnsatisfiedLinkError: No implementation found for void com.mchsdk.paysdk.net.MCHKeyTools.n
如题报错:2020-11-17 11:06:25.640 31301-31301/? E/AndroidRuntime: FATAL EXCEPTION: mainProcess: cn.net.gfan.gfansdk, PID: 31301java.lang.UnsatisfiedLinkError: No implementation found for void com.mchsdk.pa
·
如题报错:
2020-11-17 11:06:25.640 31301-31301/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.net.gfan.gfansdk, PID: 31301
java.lang.UnsatisfiedLinkError: No implementation found for void com.mchsdk.paysdk.net.MCHKeyTools.natInit() (tried Java_com_mchsdk_paysdk_net_MCHKeyTools_natInit and Java_com_mchsdk_paysdk_net_MCHKeyTools_natInit__)
at com.mchsdk.paysdk.net.MCHKeyTools.natInit(Native Method)
at com.mchsdk.paysdk.net.MCHKeyTools.<init>(MCHKeyTools.java:23)
at com.mchsdk.paysdk.net.MCHKeyTools.getInstance(MCHKeyTools.java:28)
at com.mchsdk.paysdk.utils.SdkDomain.getKey(SdkDomain.java:106)
at com.mchsdk.paysdk.utils.SdkDomain.init(SdkDomain.java:42)
at com.mchsdk.paysdk.utils.XiaYiYeUtils.init(XiaYiYeUtils.java:82)
at cn.net.gfan.gfansdk.MyApplication.onCreate(MyApplication.java:28)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1158)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6242)
at android.app.ActivityThread.access$1400(ActivityThread.java:234)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1894)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7104)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876)
如上图:错误信息提示有方法未实现,但是我这边目前是直接从老版本的SDK迁移过来的,理论应该不会报错,经过再三检查排除万难只有一种可能那就是我这边加载so库的工具类的所在包名(路径)与老版本SDK不一致,于是我将新版本SDK的路径改为老版本SDK的路径后成功不报错,解决了!如下图:
经过本人测试,发现我们这个加解密的so库是根据指定的包名路径生成的,也就是说只能将so库加载工具类文件放到指定的包名下,否则加载so会报错如标题错误一样
更多推荐
已为社区贡献5条内容
所有评论(0)