不幸的是,系统 UI 已停止

Unfortunately System UI has stopped(不幸的是,系统 UI 已停止)

本文介绍了不幸的是,系统 UI 已停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我在 WXGA800 模式下启动 4.0.3 模拟器时都会收到此消息.我的应用程序在不运行系统 UI 的情况下工作正常,除了操作栏不出现并且我无法测试我的操作栏功能.我的操作系统是 Win7 x64.SDK 修订版 19.有任何想法吗?

I gets this message every time I start 4.0.3 emulator in WXGA800 mode. My app works fine without running System UI except action bar does not appears and I can't test my actionbar functionality. My OS is Win7 x64. Sdk revision 19. Any ideas?

堆栈跟踪:

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.RuntimeException: Tablet device cannot show navigation bar and system bar
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2263)
at android.app.ActivityThread.access$1600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Tablet device cannot show navigation bar and system bar
at com.android.systemui.statusbar.tablet.TabletStatusBar.makeStatusBarView(TabletStatusBar.java:451)
at com.android.systemui.statusbar.StatusBar.start(StatusBar.java:64)
at com.android.systemui.statusbar.tablet.TabletStatusBar.start(TabletStatusBar.java:390)
at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:93)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)

我想通了.当 hw.mainKeys 在 AVD 设置中设置为 false 时会发生这种情况.感谢您的回答!

I figured it out. It happens when hw.mainKeys set to false in AVD setings. Thanks for your answers!

推荐答案

不能同时拥有系统栏和导航栏:

You can't have both system bar and navigation bar:

原因:java.lang.RuntimeException:平板设备无法显示导航栏和系统栏

Caused by: java.lang.RuntimeException: Tablet device cannot show navigation bar and system bar

这取自 TabletStatusBar#makeStatusBarView 注意注释:

This is taken from the source of TabletStatusBar#makeStatusBarView note the comment:

     try {
         // Sanity-check that someone hasn't set up the config wrong and asked for a navigation
         // bar on a tablet that has only the system bar
         if (mWindowManager.hasNavigationBar()) {
             throw new RuntimeException(
                     "Tablet device cannot show navigation bar and system bar");
         }
     } catch (RemoteException ex) {
     }

这篇关于不幸的是,系统 UI 已停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:不幸的是,系统 UI 已停止

基础教程推荐