Android集成极光推送 的异常

Android集成极光推送 的异常

Android集成极光推送报错,细节方面导致程序报的异常,但方便有同学之后遇到,这里做个记录

1.贴下报错信息:

D/JPush: [JPushInterface] action:init - sdkVersion:2.1.5, buildId:298
E/JPush: [JPushInterface] System.loadLibrary::jpush215java.lang.UnsatisfiedLinkError:
 dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.hy.jpush-1/
base.apk"],nativeLibraryDirectories=[/data/app/com.hy.jpush-1/lib/arm64, /vendor/
lib64, /system/lib64]]] couldn't find "libjpush215.so"
W/System.err: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList
[[zip file "/data/app/com.hy.jpush-1/base.apk"],nativeLibraryDirectories=[/data/app/
com.hy.jpush-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libjpush215.so"
07-22 17:48:42.284 13121-13121/? W/System.err:     at cn.jpush.android.api.JPushInterface.init(Unknown Source)
07-22 17:48:42.304 13121-13121/? W/System.err: java.lang.UnsatisfiedLinkError: 
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.hy.jpush-1/
base.apk"],nativeLibraryDirectories=[/data/app/com.hy.jpush-1/lib/arm64, /vendor/
lib64, /system/lib64]]] couldn't find "libjpush215.so"
...

07-22 17:48:42.304 13121-13121/? E/art: No implementation found for int 
cn.jpush.android.service.PushProtocol.GetSdkVersion() (tried Java_cn_jpush_android_service_PushProtocol_GetSdkVersion and 
Java_cn_jpush_android_service_PushProtocol_GetSdkVersion__)
07-22 17:48:42.304 13121-13121/? E/JPush: [JPushGlobal] Get sdk version fail![获取sdk版本失败!]
07-22 17:48:42.304 13121-13121/? W/System.err: java.lang.UnsatisfiedLinkError: No 
implementation found for int cn.jpush.android.service.PushProtocol.GetSdkVersion() 
(tried Java_cn_jpush_android_service_PushProtocol_GetSdkVersion and 
Java_cn_jpush_android_service_PushProtocol_GetSdkVersion__)
07-22 17:48:42.304 13121-13121/? W/System.err:     at 
cn.jpush.android.service.PushProtocol.GetSdkVersion(Native Method)
07-22 17:48:42.304 13121-13121/? W/System.err:     at cn.jpush.android.e.a(Unknown 
Source)
07-22 17:48:42.304 13121-13121/? W/System.err:     at cn.jpush.android.e.a(Unknown 
Source)
07-22 17:48:42.304 13121-13121/? W/System.err:     at 
cn.jpush.android.api.JPushInterface.init(Unknown Source)
07-22 17:48:42.304 13121-13121/? E/JPush: [JPushGlobal] JPush .so file do not match
 JPush .jar file in the project, Failed to init JPush
07-22 17:48:42.594 13121-13121/? D/JPush: [PushReceiver] onReceive - android.net.conn.CONNECTIVITY_CHANGE
...

2.可以从上面的报错信息看到 “找不到libjpush215.so”,程序中明明有libjpush2.15so包,莫非日志提示错了,查了极光论坛,看到有帖子上面说了此异常发生的原因,才恍然大悟。

3.该帖的url:

https://community.jiguang.cn/t/06-06-10-44-56-384-e-jpush-22543-jpushglobal-get-sdk-version-fail-sdk/4189

4.主要由于so包和jar包的版本不对应导致了该异常,那么解决的方案就很简单了,替换成一致的即可;

5.细节细节,这里就不总结咯!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值