quot;No keyboard for id 0quot; - what does it mean?(“没有 id 0 的键盘- 这是什么意思?)
问题描述
每次我的 Optionsmenu 打开(onCreateOptionsMenu(..) 被调用),我收到以下警告:
Each time my Optionsmenu opens (onCreateOptionsMenu(..) is called), I get these warnings:
id 0 没有键盘"
和
"使用默认键映射:/system/usr/keychars/qwerty.kcm.bin"
"Using default keyMap: /system/usr/keychars/qwerty.kcm.bin"
我不明白他们的意思,有人知道吗?我不喜欢 this answer.
I couldn't find out what they mean, does anyone know ? I didn't like this answer.
这是我正在使用的简单代码:
Here's the simple code I'm using:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.optmenu_start, menu);
return true;
}
和 optmenu_start.xml:
and the optmenu_start.xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/optmenu_prefs"
android:title="QHN0cmluZy9vcHRtZW51X3ByZWZz"
android:icon="@drawable/icon_menu_prefs"
/>
<item
android:id="@+id/optmenu_help"
android:title="QHN0cmluZy9vcHRtZW51X2hlbHA="
android:icon="@drawable/icon_menu_help"
/>
</menu>
推荐答案
谷歌的答案是
" 日志是正常的;它发生在设备第一次需要键盘映射时在一个过程中."
" The log is normal; it happens the first time a keymap is needed for a device in a process. "
http://groups.google.com/group/android-developers/browse_thread/thread/477caf755085b108
因此,如果您在 Activity1 之前启动 Activity2,您会在 Activity2 而不是 Activity1 中看到警告!
So therefore if you started Activity2 before Activity1 you would see the warning in Activity2 and not Activity1!
正如我所说,我认为很多开发人员都会收到此消息,这只是警告而不是错误;可以忽略.
As I said I think a lot of developers get this message and it's just a warning not an error; it can be ignored.
这篇关于“没有 id 0 的键盘"- 这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“没有 id 0 的键盘"- 这是什么意思?


- Android viewpager检测滑动超出范围 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 拆分 Drawable 2022-01-01