主屏幕应用小部件配置活动在 GEL Launcher 下崩溃 [英] Homescreen App Widget Configuration Activity crashes under GEL Launcher

查看:30
本文介绍了主屏幕应用小部件配置活动在 GEL Launcher 下崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我为我的应用小部件使用配置 Activity 时,一旦我使用带有 Android 4.4.2 和 GEL Launcher(默认启动器)的 Nexus 5 将 Activity 设置为 RESULT_OK,它就会崩溃.当我对 Android SDK API 示例小部件进行相同尝试时,也会发生同样的情况.因此我认为这不是我的代码的错.相同的代码使用我的 Nexus 4 及其默认启动器和相同的 Android 版本.错误日志(使用API​​ Examples Widget)如下:

When I use a configuration Activity for my app widget it crashes once I leave the activity with RESULT_OK set using my Nexus 5 with Android 4.4.2 and GEL Launcher (the default launcher). When I try the same with the Android SDK API Examples Widget, the same happens. Therefore I assume it is not the fault of my code. The same code works using my Nexus 4 with its default launcher and same Android version. The error log (using API Examples Widget) is as follows:

I/GEL     ( 8852): handleIntent(Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL })
D/AndroidRuntime( 8852): Shutting down VM
W/dalvikvm( 8852): threadid=1: thread exiting with uncaught exception (group=0x415b8ba8)
E/AndroidRuntime( 8852): FATAL EXCEPTION: main
E/AndroidRuntime( 8852): Process: com.google.android.googlequicksearchbox, PID: 8852
E/AndroidRuntime( 8852): java.lang.RuntimeException: Unable to resume activity {com.google.android.googlequicksearchbox/com.google.android.launcher.GEL}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=5, result=-1, data=Intent { (has extras) }} to activity {com.google.android.googlequicksearchbox/com.google.android.launcher.GEL}: java.lang.NullPointerException
E/AndroidRuntime( 8852):        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2788)
E/AndroidRuntime( 8852):        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2817)
E/AndroidRuntime( 8852):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
E/AndroidRuntime( 8852):        at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 8852):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 8852):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 8852):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 8852):        at android.app.ActivityThread.main(ActivityThread.java:5017)
E/AndroidRuntime( 8852):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8852):        at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 8852):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime( 8852):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime( 8852):        at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 8852): Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=5, result=-1, data=Intent { (has extras) }} to activity {com.google.android.googlequicksearchbox/com.google.android.launcher.GEL}: java.lang.NullPointerException
E/AndroidRuntime( 8852):        at android.app.ActivityThread.deliverResults(ActivityThread.java:3365)
E/AndroidRuntime( 8852):        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2775)
E/AndroidRuntime( 8852):        ... 12 more
E/AndroidRuntime( 8852): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 8852):        at com.android.launcher3.Launcher.onActivityResult(Launcher.java:804)
E/AndroidRuntime( 8852):        at com.google.android.launcher.GEL.onActivityResult(GEL.java:206)
E/AndroidRuntime( 8852):        at android.app.Activity.dispatchActivityResult(Activity.java:5423)
E/AndroidRuntime( 8852):        at android.app.ActivityThread.deliverResults(ActivityThread.java:3361)
E/AndroidRuntime( 8852):        ... 13 more
W/ActivityManager(  792):   Force finishing activity com.google.android.googlequicksearchbox/com.google.android.launcher.GEL

查看 com.android.launcher3.Launcher.onActivityResult(Launcher.java:804) 的源代码,似乎变量 mDragLayer 为空.有没有人有解决这个问题的方法?

Looking at the source code of com.android.launcher3.Launcher.onActivityResult(Launcher.java:804) it seems that the variable mDragLayer is null. Does anyone has a workaround for this problem?

推荐答案

我无法将小部件添加到我的主屏幕,并且在googlequicksearchbox"中一直崩溃.经过数小时的搜索和技术支持,我找到了这个.取消选中设置-> 开发者选项-> 不保留活动,修复它.

I could not add widgets to my home screen and kept getting crashes in "googlequicksearchbox". Many hours of searching and tech support, I found this. Unchecking Settings-> Developer options-> Don't keep activities, fixed it.

这篇关于主屏幕应用小部件配置活动在 GEL Launcher 下崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆