当前位置:网站首页>华为应用强制更新中,偶现点击“退出应用”退不出应用
华为应用强制更新中,偶现点击“退出应用”退不出应用
2022-07-16 10:52:00 【华为开发者论坛】
问题描述
我们游戏集成了6.2.0.300版本的游戏sdk后,后台提交更新包并勾选了“强制更新”选项,新包上线后,在测试游戏强制升级功能时,发现偶现的点击“退出应用”退不出游戏,查看日志发现最后一次点击按钮, 升级sdk中isExit 字段返回的false,所以怀疑是不是sdk的问题。
问题分析
带着疑问联系华为技术支持(可提单联系),技术支持复现问题后,发现最后一次点击“退出应用”按钮,并没有进入升级的回调,而isExit字段返回的false,还是上一次弹升级弹窗返回的,本次点击按钮并没有打印日志,所以导致我误以为是isExit字段返回false导致的没有退出游戏。
技术支持分析之所以没有退出游戏,是因为我的升级代码是这么写的:
因为callback放在了局部变量中,很容易被回收,所以会偶现收不到回调。
问题解决
解决的方法就是把callback放到成员变量里,如下图所示:

改完之后,问题解决。
边栏推荐
- 反向加薪,这是什么操作?
- 《經濟日報》點贊RPA領軍企業弘璣,助力金融機構數字化轉型
- US pressure surges tiktok changes global safety director
- 面试官:怎么不用定时任务实现关闭订单?
- Big model training is difficult to go to the sky? Here comes the efficient and easy-to-use "Li Bai" model library
- C language bit field
- Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return
- 从零开始构建向量数据库:Milvus 的源码编译安装(二)
- Debugging of diagnostic function of analog power amplifier 75610
- 【node+ts】搭建node+typescript项目
猜你喜欢

Postgresql-14.4-源码阅读02-ReadBuffer_common-后续再更新此篇-看的头大

One stop Devops platform makes a big difference in development

Reverse salary increase, what is this operation?

藏红花是否会成为用于关节炎患者的安全和有效的自然疗法?

The latest version 0.3 of Infini console, which has been waiting for a long time, is officially released!

在线SQL转YAML工具

健康防猝指南2:饮食健康

Scala 基础 (二):变量和数据类型

Big model training is difficult to go to the sky? Here comes the efficient and easy-to-use "Li Bai" model library

【深度学习】4 万字笔记!Yann LeCun 深度学习公开课 125 页干货都在这了
随机推荐
Oppo and Yijia will be banned in Germany? It turned out to be targeted by "patent hooligan" Nokia!
【机器学习】 逻辑回归原理及代码
@ConditionalOnProperty的简单理解与使用
ModStart模块预发布功能上线啦
面试官:怎么不用定时任务实现关闭订单?
Database daily question --- day 24: format department table
JESD204B调试笔记(实用版)
[learning record] temporarily cancel the control of tpro (simple)
[deep learning] 40000 word notes! Yann Lecun deep learning open class 125 pages of dry goods are here
MindManager专业版2022思维导图工具
【Golang】切片(slice)
Cv2.resize pit
链表 - 【删除所有重复的元素】
How to choose MySQL database storage engine? Let's take a look at the performance test
OPPO、一加将在德国禁售?原来是被“专利流氓”诺基亚盯上了!
Error in v-on handler: “ReferenceError: Toast is not defined“
873. 最长的斐波那契子序列的长度
Unity 基础 之 Camera摄像机属性介绍
(cf)Codeforces Round #807 (Div. 2)A--C思维题
一站式 DevOps 平台,让开发大不同