崩潰當我使用一個配置Activity我的應用程序插件崩潰,一旦我離開RESULT_OK活動使用我的Nexus 5採用Android 4.4.2和GEL啓動(缺省啓動程序)來設置。當我嘗試使用Android SDK API示例Widget時,也會發生同樣的情況。所以我認爲這不是我的代碼的錯。使用默認啓動器和相同Android版本的Nexus 4也可以使用相同的代碼。 (使用API示例窗口小部件)的錯誤日誌如下:主屏幕應用的Widget配置活動下GEL啓動
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爲空。有沒有人有解決這個問題的方法?
值得注意的是 - Android 4.4.4隱藏了開發者設置。爲了找到他們,你需要去設置 - >關於,並且點擊Build Number,直到它說你是一個開發者。 不幸的是,一旦我做到了這一點,並打開(或關閉)「不要保持活動」選項,這個啓動器崩潰問題仍然存在。它沒有解決問題。 –