0
"<Keyboard>" does not set the required layout_height attribute:
 (1) Set to "wrap_content"
 (2) Set to "fill_parent"
"<Row>" does not set the required layout_width attribute:
 (1) Set to "wrap_content"
 (2) Set to "fill_parent"
"<Row>" does not set the required layout_height attribute:
 (1) Set to "wrap_content"
 (2) Set to "fill_parent"
"<Key>" does not set the required layout_width attribute:
 (1) Set to "wrap_content"
 (2) Set to "fill_parent"
"<Key>" does not set the required layout_height attribute:
 (1) Set to "wrap_content"
 (2) Set to "fill_parent"
com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
You must supply a layout_height attribute.
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)
- com.example.android.softkeyboard.LatinKeyboardView (Fix Build Path, Edit XML, Create Class)
4

2 回答 2

3

这意味着您的 xml 键盘布局文件丢失android:layout_width和/或android:layout_height某些组件丢失。

编辑

乍一看,您似乎将键盘布局文件放在res/layout文件夹中。它属于res/xml文件夹。

于 2012-04-03T20:57:03.097 回答
0

项目中的 xml 文件包含以下元素

“不要设置所需的 layout_height 属性”。

对于每个元素,设置它,例如:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    **android:layout_height="fill_parent"**
    android:background="@android:color/transparent">
于 2012-04-03T20:56:08.650 回答