极光推送无法初始化并注册成功

hengmu
2019-08-11 16:41 1.8k 0

我在项目里通过手动集成方式集成了极光推送,并且在application里调用JPushInterface.setDebugMode(true);JPushInterface.init(this);进行初始化,但是一直未能成功,MyReceiver未打印任何日志。

如下是从初始化开始经过jiguang字段过滤打印的所有日志:
08-12 00:33:48.902 9306-9306/com.ifwallet D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.3.4, buildId:36
08-12 00:33:48.922 9306-9306/com.ifwallet D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
08-12 00:33:48.932 9306-9306/com.ifwallet I/JIGUANG-JPush: [JPushGobal] found messageReceiverClass :com.ifwallet.service.MyJpushReceiver by getCommonReceiverNames
08-12 00:33:48.942 9306-9306/com.ifwallet D/JIGUANG-JPush: [JPushGobal] is not same process with JCommonService
08-12 00:33:48.942 9306-9306/com.ifwallet D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:init
08-12 00:33:48.952 9306-9371/com.ifwallet I/JIGUANG-JCore: [JCoreGobal] action:init jcore,version:2.0.1,build id:30
08-12 00:33:48.962 9306-9371/com.ifwallet I/JIGUANG-JCore: [JCommonServiceHelper] found userServiceClass :com.ifwallet.service.PushService by getCommonServiceNames
08-12 00:33:49.092 9306-9306/com.ifwallet D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:change_foreground
08-12 00:33:49.092 9306-9306/com.ifwallet D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:notification_state
08-12 00:35:24.992 9306-9306/com.ifwallet D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:change_foreground
08-12 00:35:25.022 9306-10426/com.ifwallet D/JIGUANG-JCore: [CheckManifestHelper] manifest:channel - developer-default

后经过尝试以及问题排查,发现我把application里对数据库Realm的初始化注释掉,推送可以初始化成功,也能收到推送消息,但是一放开注释推送就不能用,项目中必须用到数据库,我想知道这问题该怎么解决。

1个回答

热门排序