0

可能重复:
创建自定义 android 键盘布局

我开始开发自己的 ime,但我坚持使用 xml 文件。Eclipse 似乎无法找到 Keyboard、Row 和 Key 类。谁能告诉我如何解决这个问题或如何用 java 编写一个 ime 布局?如果此描述缺少信息,请随时告诉我。无论如何,首先感谢大家,它表明了这一点: NOTE: This project contains Java compilation errors, which can cause rendering failures for custom views. Fix compilation problems first.

"" does not set the required layout_width attribute: (1) Set to "wrap_content" (2) Set to "match_parent" "" does not set the required layout_height attribute: (1) Set to "wrap_content" 如果我设置 layout_widht 属性,它会显示:

NOTE: This project contains Java compilation errors, which can cause rendering failures for custom views. Fix compilation problems first.

com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup Exception details are logged in Window > Show View > Error Log The following classes could not be found: - Keyboard (Fix Build Path, Edit XML) - Row (Fix Build Path, Edit XML)

4