Java android:ime渲染问题

Java android:ime渲染问题,java,android,xml,android-edittext,ime,Java,Android,Xml,Android Edittext,Ime,我有一个谷歌的登录模板错误。我使用登录活动,但在渲染/设计屏幕中总是出现以下错误: The following classes could not be found: - EditText (Fix Build Path) Tip: Try to build the project. 这个问题是由android:imeactionidxml方法引起的。以下是我(谷歌)的代码: 如果我删除所有android:ime[…]行,它的渲染效果会非常好。 我使用Android Studio 1.5.

我有一个谷歌的登录模板错误。我使用登录活动,但在渲染/设计屏幕中总是出现以下错误:

The following classes could not be found:
- EditText (Fix Build Path)
Tip: Try to build the project.
这个问题是由android:imeactionidxml方法引起的。以下是我(谷歌)的代码:


如果我删除所有android:ime[…]行,它的渲染效果会非常好。 我使用Android Studio 1.5.1并编译DK21版

我希望你能帮我解决这个问题


干杯

这是由于
android:imeActionId
行的名称具有误导性

它的初始值“@+id/login”表示它正在设置自己的id值,但它希望您分配一个

请看

它为我提供了一个有效的解决方案

<EditText
                android:id="@+id/password"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/prompt_password"
                android:imeActionId="@+id/login"
                android:imeActionLabel="@string/action_sign_in_short"
                android:imeOptions="actionUnspecified"
                android:inputType="textPassword"
                android:maxLines="1"
                android:singleLine="true" />