IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 移动开发 -> Unity : Timeout while trying to pause the Unity Engine.应用闪退问题修复 -> 正文阅读

[移动开发]Unity : Timeout while trying to pause the Unity Engine.应用闪退问题修复

在一些设备上,某种条件下调用Unity?C#的Application.quit()接口会导致闪退。需要改为调用Android原生接口,代码如下:

activity.finish();
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(0);

报错如下:

10403-28 18:27:05.162 25084 25084 W Unity : Timeout while trying to pause the Unity Engine.
10503-28 18:27:05.191 25084 25084 E ANR_LOG : >>> msg's executing time is too long
10603-28 18:27:05.192 25084 25084 E ANR_LOG : Blocked msg = { when=-4s32ms what=102 target=android.app.ActivityThread$H obj=android.os.BinderProxy@3bfac69e } , cost = 4032 ms
10703-28 18:27:05.192 25084 25084 E ANR_LOG : >>>Current msg List is:
10803-28 18:27:05.192 25084 25084 E ANR_LOG : Current msg <1> = { when=-4s32ms what=0 target=android.os.Handler callback=$Proxy3 }
10903-28 18:27:05.192 25084 25084 E ANR_LOG : Current msg <2> = { when=-4s30ms what=0 target=android.os.Handler callback=com.unity3d.player.UnityPlayer$8 }
11003-28 18:27:05.192 25084 25084 E ANR_LOG : Current msg <3> = { when=-4s26ms what=0 target=android.app.ActivityThread$H callback=android.app.LoadedApk$ServiceDispatcher$RunConnection }
11103-28 18:27:05.192 25084 25084 E ANR_LOG : Current msg <4> = { when=-3s994ms what=0 target=android.app.ActivityThread$H callback=android.app.LoadedApk$ServiceDispatcher$RunConnection }
11203-28 18:27:05.193 25084 25084 E ANR_LOG : Current msg <5> = { when=-3s896ms what=17 target=android.view.ViewRootImpl$ViewRootHandler obj=android.view.ViewRootImpl$SystemUiVisibilityInfo@359d6abc }
11303-28 18:27:05.193 25084 25084 E ANR_LOG : Current msg <6> = { when=-3s894ms what=118 target=android.app.ActivityThread$H obj={1.12 ?mcc?mnc zh_CN ?layoutDir sw360dp w360dp h622dp 480dpi nrml long port finger -keyb/v/h -nav/h s.44mThemeChanged = 0mThemeChangedFlags = 0mFlipFont = 0} }
11403-28 18:27:05.193 25084 25084 E ANR_LOG : Current msg <7> = { when=-3s881ms what=2 target=android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate }
11503-28 18:27:05.193 25084 25084 E ANR_LOG : Current msg <8> = { when=-3s881ms what=2 target=android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate }
11603-28 18:27:05.194 25084 25084 E ANR_LOG : Current msg <9> = { when=-3s864ms what=8 target=android.view.ViewRootImpl$ViewRootHandler }
11703-28 18:27:05.194 25084 25084 E ANR_LOG : Current msg <10> = { when=-3s864ms what=130 target=com.android.internal.view.IInputConnectionWrapper$MyHandler arg1=247 }
11803-28 18:27:05.194 25084 25084 E ANR_LOG : Current msg <11> = { when=-3s862ms what=3 target=android.view.SurfaceView$1 }
11903-28 18:27:05.194 25084 25084 E ANR_LOG : Current msg <12> = { when=-3s862ms what=5 target=android.view.ViewRootImpl$ViewRootHandler obj=com.android.internal.os.SomeArgs@13f3ea45 }
12003-28 18:27:05.204 25084 25084 E ANR_LOG : Current msg <13> = { when=-3s855ms what=4 target=android.view.inputmethod.InputMethodManager$H }
12103-28 18:27:05.204 25084 25084 E ANR_LOG : Current msg <14> = { when=-3s855ms what=3 target=android.view.inputmethod.InputMethodManager$H arg1=331 }
12203-28 18:27:05.205 25084 25084 E ANR_LOG : Current msg <15> = { when=-3s807ms what=100 target=com.android.internal.view.IInputConnectionWrapper$MyHandler }
12303-28 18:27:05.205 25084 25084 E ANR_LOG : Current msg <16> = { when=-3s807ms what=65 target=com.android.internal.view.IInputConnectionWrapper$MyHandler }
12403-28 18:27:05.205 25084 25084 E ANR_LOG : Current msg <17> = { when=-3s761ms what=17 target=android.view.ViewRootImpl$ViewRootHandler obj=android.view.ViewRootImpl$SystemUiVisibilityInfo@699f59a }
12503-28 18:27:05.205 25084 25084 E ANR_LOG : Current msg <18> = { when=-3s731ms what=0 target=android.app.ActivityThread$H callback=android.app.LoadedApk$ServiceDispatcher$RunConnection }
12603-28 18:27:05.205 25084 25084 E ANR_LOG : Current msg <19> = { when=-3s462ms what=140 target=android.app.ActivityThread$H arg1=20 }
12703-28 18:27:05.205 25084 25084 E ANR_LOG : Current msg <20> = { when=-3s462ms what=109 target=android.app.ActivityThread$H arg1=1 obj=android.os.BinderProxy@3bfac69e }
12803-28 18:27:05.205 25084 25084 E ANR_LOG : >>>CURRENT MSG DUMP OVER<<<

  移动开发 最新文章
Vue3装载axios和element-ui
android adb cmd
【xcode】Xcode常用快捷键与技巧
Android开发中的线程池使用
Java 和 Android 的 Base64
Android 测试文字编码格式
微信小程序支付
安卓权限记录
知乎之自动养号
【Android Jetpack】DataStore
上一篇文章      下一篇文章      查看所有文章
加:2022-03-30 18:36:39  更:2022-03-30 18:38:22 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年9日历 -2024/9/23 3:33:39-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码