百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
返回工具页/返回 Issues 列表
#3344·weex

weex 在 Android 14 系统上因 registerReceiver 发生崩溃

作者: nieyuqi创建于 2024年7月24日更新于 2024年7月24日

compile 33, targetsdk 35, running on the android 14 system crashes: `One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver is not being registered exclusively for system broadcasts` The reason for the analysis should be that when registering broadcasts on the android 14 system, the following three parameters must be used: `public abstract Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter, @RegisterReceiverFlags int flags);` However, in the 0.30.2 version of weex, the WXSDKInstance class uses the two-parameter method in onActivityCreateff: try { this.getContext().registerReceiver(this.mGlobalEventReceiver, new IntentFilter("wx_global_action")); } catch (Throwable var2) { Throwable e = var2; WXLogUtils.e(e.getMessage()); this.mGlobalEventReceiver = null; } What is the latest version of the weex android SDK? Is there a solution to this problem?

内容来源: alibaba/weex

查看 GitHub 原文在 GitHub 查看讨论