Unfortunately System UI has stopped(不幸的是,系统 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 已停止
基础教程推荐
- Android:对话框关闭而不调用关闭 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01