“没有 id 0 的键盘"- 这是什么意思?

quot;No keyboard for id 0quot; - what does it mean?(“没有 id 0 的键盘- 这是什么意思?)
本文介绍了“没有 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="@string/optmenu_prefs"
    android:icon="@drawable/icon_menu_prefs"
  />
  <item
    android:id="@+id/optmenu_help"
    android:title="@string/optmenu_help"
    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 的键盘"- 这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

How can I use CClistview in COCOS2d Android?(如何在 COCOS2d Android 中使用 CClistview?)
cocos2d-android: how to display score(cocos2d-android:如何显示分数)
Sqlite database not copied from asset folder Android(Sqlite 数据库未从资产文件夹 Android 复制)
SQLite Database Copy Appears Corrupted When Generated by Device and not Emulator(SQLite 数据库副本在由设备而不是模拟器生成时出现损坏)
Android file copy(安卓文件拷贝)
Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)