当极光推送所在的app出现闪退后,再次进入app,极光推送初始化会失败或者不执行

用户6135980
2021-01-15 07:13 55 1

当极光推送所在的app出现闪退后,再次进入app,发现极光推送初始化后的子进程没有再次创建,
在Application的类上打印日志,app包名:pushcore 这个没有打印出来

MyApplication类:

public class MyApplication extends Application {


    @Override
    public void onCreate() {
        super.onCreate();
        String processName = this.getProcessName();
        Log.e("aaaa", "======processName:" + processName);
        //判断进程名,保证只有主进程运行
        if (!TextUtils.isEmpty(processName) && processName.equals(this.getPackageName())) {
            //在这里进行主进程初始化逻辑操作
            Log.e("aaaa", "====== MyApplication onCreate() 2 ========");

        } else {

                         //正常开启,会打印下面的日志
            //APP 闪退后,再次打开,未打印下面这个日志
            Log.e("aaaa", "======= JPushInterface init() =======");
        }
        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);
    }

    public static String getProcessName() {
        try {
            File file = new File("/proc/" + android.os.Process.myPid() + "/" + "cmdline");
            BufferedReader mBufferedReader = new BufferedReader(new FileReader(file));
            String processName = mBufferedReader.readLine().trim();
            mBufferedReader.close();
            return processName;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}

再次进入app的日志:

2021-01-15 15:33:18.339 27646-27646/? D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.8.5, buildId:86
2021-01-15 15:33:18.369 27646-27646/? D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
2021-01-15 15:33:18.382 27646-27646/? I/JIGUANG-JPush: [JPushConstants] found messageReceiverClass :com.eslink.jpushlogtest.jp.PushMessageReceiverat com.eslink.jpushlogtest by getCommonReceiverNames
2021-01-15 15:33:18.557 27646-27646/? W/JIGUANG-JPush: [AndroidUtil] not found FileProvider
2021-01-15 15:33:18.558 27646-27646/? W/JIGUANG-JPush: [AndroidUtil] AndroidManifest.xml missing required FileProvider or meta-data is wrong
2021-01-15 15:33:18.578 27646-27646/? W/JIGUANG-JPush: [AndroidUtil] You will unable to use install app of in-app message.
2021-01-15 15:33:18.581 27646-27646/? D/JIGUANG-JPush: [ActionHelper] doSingleAction: third_init
2021-01-15 15:33:18.609 27646-27672/? I/JIGUANG-D: [JDyAndroidUtils] found userServiceClass :com.eslink.jpushlogtest.jp.PushService by getCommonServiceNames
2021-01-15 15:33:18.618 27646-27672/? I/JIGUANG-JCore: [JCommonServiceHelper] found userServiceClass :com.eslink.jpushlogtest.jp.PushService by getCommonServiceNames
2021-01-15 15:33:18.622 27646-27672/? D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:install_status
2021-01-15 15:33:18.622 27646-27676/? I/JIGUANG-JCore: [JCoreGobal] action:init jcore,version:2.5.5,build id:42,l:255
2021-01-15 15:33:18.624 27646-27672/? D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:init
2021-01-15 15:33:18.639 27646-27677/? D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
2021-01-15 15:33:18.674 26425-26453/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:install_status
2021-01-15 15:33:18.678 26425-26453/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:init
2021-01-15 15:33:18.806 27646-27677/? W/JIGUANG-JPush: [AndroidUtil] not found FileProvider
2021-01-15 15:33:18.807 27646-27677/? W/JIGUANG-JPush: [AndroidUtil] AndroidManifest.xml missing required FileProvider or meta-data is wrong
2021-01-15 15:33:18.808 27646-27677/? D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:install_status
2021-01-15 15:33:18.810 27646-27677/? W/JIGUANG-JPush: [AndroidUtil] You will unable to use install app of in-app message.
2021-01-15 15:33:18.815 26425-26453/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:install_status
2021-01-15 15:33:19.016 27646-27646/? D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:notification_state
2021-01-15 15:33:19.020 27646-27646/? D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:change_foreground_dy
2021-01-15 15:33:19.021 27646-27646/? D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:change_foreground
2021-01-15 15:33:19.025 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [JCoreTCPManager] Send heart beat
2021-01-15 15:33:19.030 26425-26453/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCommon: [JCommonInterface] onEvent action:notification_state
2021-01-15 15:33:19.037 26425-26453/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:change_foreground_dy
2021-01-15 15:33:19.043 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [InAppHbPeriodManager] Send heart beat
2021-01-15 15:33:19.043 26425-26453/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:change_foreground
2021-01-15 15:33:19.076 26425-26479/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:36, pkg:com.eslink.jpushlogtest
2021-01-15 15:33:19.077 26425-26479/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [NetworkingClient] Network listening...
2021-01-15 15:33:19.090 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [JCoreTCPManager] Action - onHeartbeatSucceed
2021-01-15 15:33:19.092 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:jcore_on_event
2021-01-15 15:33:29.060 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:msg_time_out
2021-01-15 15:38:04.128 26425-26476/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:jcore_on_event
2021-01-15 15:38:04.130 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [JCoreTCPManager] Send heart beat
2021-01-15 15:38:04.132 26425-26476/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCommon: [JCommonInterface] onEvent action:periodtask
2021-01-15 15:38:04.239 26425-26479/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:36, pkg:com.eslink.jpushlogtest
2021-01-15 15:38:04.240 26425-26479/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [NetworkingClient] Network listening...
2021-01-15 15:38:04.245 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JCore: [JCoreTCPManager] Action - onHeartbeatSucceed
2021-01-15 15:38:04.247 26425-26527/com.eslink.jpushlogtest:pushcore D/JIGUANG-JPush: [ActionHelper] doAction:jcore_on_event

2个回答

热门排序
  • 用户6135980
    2021-01-19 09:01
    xml文件配置如下: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/a 展示全部
  • 这个是manifest里面没有配置好,你根据集成文档查看一下配置
    null