Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 不幸的是,在关闭我在三星Galaxy S6中的应用程序后,系统UI已停止_Android - Fatal编程技术网

Android 不幸的是,在关闭我在三星Galaxy S6中的应用程序后,系统UI已停止

Android 不幸的是,在关闭我在三星Galaxy S6中的应用程序后,系统UI已停止,android,Android,我正在android上开发一个应用程序,它工作完美、顺利,没有任何问题 问题: 当我关闭应用程序时,手机开始向我发送错误信息: 不幸的是,系统UI已经停止 当我关闭对话框时,它会给我另一个错误,直到我卸载我的应用程序 p.S我已经在Galaxy Tab S2和LG V10以及其他一些手机上测试了我的应用程序,它没有给我任何错误。问题仅出现在三星Galaxy S6中 当手机告诉我错误时,会将其记录在logcat中: 06-19 17:38:26.481 26821-26821/? E/Androi

我正在android上开发一个应用程序,它工作完美、顺利,没有任何问题

问题:

当我关闭应用程序时,手机开始向我发送错误信息:

不幸的是,系统UI已经停止

当我关闭对话框时,它会给我另一个错误,直到我卸载我的应用程序

p.S我已经在Galaxy Tab S2和LG V10以及其他一些手机上测试了我的应用程序,它没有给我任何错误。问题仅出现在三星Galaxy S6中

当手机告诉我错误时,会将其记录在logcat中:

06-19 17:38:26.481 26821-26821/? E/AndroidRuntime: FATAL EXCEPTION: main
                                               Process: com.android.systemui.recents, PID: 26821
                                               java.lang.OutOfMemoryError: Failed to allocate a 20332 byte allocation with 13472 free bytes and 13KB until OOM
                                                   at java.lang.reflect.Array.createMultiArray(Native Method)
                                                   at java.lang.reflect.Array.newInstance(Array.java:335)
                                                   at android.app.ApplicationPackageManager.getAppIconAlphaRelativeScale(ApplicationPackageManager.java:2989)
                                                   at android.app.ApplicationPackageManager.getThemeIconWithBG(ApplicationPackageManager.java:3107)
                                                   at android.app.ApplicationPackageManager.getThemeIconWithBG(ApplicationPackageManager.java:3037)
                                                   at android.app.ApplicationPackageManager.loadUnbadgedItemIcon(ApplicationPackageManager.java:2867)
                                                   at android.app.ApplicationPackageManager.loadItemIcon(ApplicationPackageManager.java:2774)
                                                   at android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:220)
                                                   at com.android.systemui.recents.misc.SystemServicesProxy.getActivityIcon(SystemServicesProxy.java:793)
                                                   at com.android.systemui.recents.model.RecentsTaskLoader.getAndUpdateActivityIcon(RecentsTaskLoader.java:463)
                                                   at com.android.systemui.recents.model.RecentsTaskLoadPlan.executePlan(RecentsTaskLoadPlan.java:279)
                                                   at com.android.systemui.recents.model.RecentsTaskLoader.loadTasks(RecentsTaskLoader.java:621)
                                                   at com.android.systemui.recents.Recents.onStart(Recents.java:393)
                                                   at com.android.systemui.recents.Recents.handleProxyCall(Recents.java:822)
                                                   at com.android.systemui.recents.Recents.handleProxyCall(Recents.java:744)
                                                   at com.android.systemui.recents.Recents.start(Recents.java:347)
                                                   at com.android.systemui.recents.Recents.getInstanceAndStartIfNeeded(Recents.java:322)
                                                   at com.android.systemui.recents.RecentsService.onCreate(RecentsService.java:39)
                                                   at android.app.ActivityThread.handleCreateService(ActivityThread.java:3807)
                                                   at android.app.ActivityThread.access$2100(ActivityThread.java:221)
                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1882)
                                                   at android.os.Handler.dispatchMessage(Handler.java:102)
                                                   at android.os.Looper.loop(Looper.java:158)
                                                   at android.app.ActivityThread.main(ActivityThread.java:7224)
                                                   at java.lang.reflect.Method.invoke(Native Method)
                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

可能的副本:


如果没有,那么您需要阅读更多关于每个库的生命周期和可能的内存泄漏的信息。有些库不会自动清除资源(如通常的Java垃圾收集器),有些库要求您自己清除资源。因此,请确保您在退出时清除了所有不需要的材料。

请提供有关应用程序本身的更多详细信息,因为当前的格式非常广泛,可能会关闭。应用程序是使用其他库编写的,还是使用默认库?应用程序有多大该应用程序几乎很大,它使用firebase和android支持库以及其他一些库,如Reformation、moshi、Picasso,问题解决了!我并没有为每个屏幕密度调整启动器图标的大小,在最近使用的应用程序中,它希望应用程序的图标很大,所以会产生内存不足的异常!伟大的请把问题标记为已解决。