我与谷歌的登录模板有一个错误。我使用登录活动,但在呈现/设计屏幕中总是会出现以下错误:
The following classes could not be found:
- EditText (Fix Build Path)
Tip: Try to build the project.这个问题是由android:imeActionId xml-方法引起的。这是我的(Google)代码:
<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" />如果我删除所有的android:ime..。线条,它的渲染非常好。我使用AndroidStudio1.5.1和compileSdkVersion 21
我希望你能帮我解决这个问题!
干杯!
发布于 2016-02-21 23:18:56
这是由于android:imeActionId行的名称具有误导性。
它的初始值"@+id/login"表示它正在设置自己的id值,但是它期望您分配一个id值。
请看Why does setting imeActionId with a predefined ID resource create an error?
它提供了一个对我有用的解决方案。
https://stackoverflow.com/questions/34473392
复制相似问题