"<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)
答案 0 :(得分:3)
这意味着某些组件的xml键盘布局文件缺少android:layout_width
和/或android:layout_height
。
修改强>
乍一看,您似乎将键盘布局文件放在res/layout
文件夹中。它属于res/xml
文件夹。
答案 1 :(得分: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">