packer-ng-plugin icon indicating copy to clipboard operation
packer-ng-plugin copied to clipboard

为啥会有读取不到渠道的情况,大概有8%的安装是读取不到渠道的

Open SUpermin6u opened this issue 5 years ago • 4 comments

SUpermin6u avatar Aug 28 '18 07:08 SUpermin6u

读取渠道抛出异常

SUpermin6u avatar Aug 28 '18 07:08 SUpermin6u

@SUpermin6u 抛得是什么异常,想学习学习看看我这边有没有这个问题

Nier-halls avatar Sep 07 '18 09:09 Nier-halls

@JuneAL 就是读取渠道的方法抛出异常了,不知道为什么读取渠道会异常,测试时没问题,但是发布后统计数据里面出现了Exception,这段代码我是修改了的,用来区分异常情况,原代码是设置为EMPTY_STRING

    public static String getChannel(final Context context) {
        try {
            return getChannelOrThrow(context);
        } catch (Exception e) {
            return "Exception";
        }
    }

SUpermin6u avatar Sep 11 '18 06:09 SUpermin6u

com.mcxiaoke.packer.helper.getChannelOrThrow 建议使用这个方法,看看异常的详情

mcxiaoke avatar Sep 21 '18 07:09 mcxiaoke