错误:在包'android'中找不到属性'alignParentBottom'的资源标识符
我是android开发中的新成员...我有一个错误,就是在'android'包中找不到属性'alignParentBottom'的资源标识符。我的布局代码如下错误:在包'android'中找不到属性'alignParentBottom'的资源标识符
<Button
android:id="@+id/button1"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/editText1"
android:layout_marginLeft="50dp"
android:layout_marginTop="40dp"
android:alignParentBottom="true"
android:text="@string/add" />
如何解决?
应该
android:layout_alignParentBottom="true".
不
android:alignParentBottom="true"
,并确保Button
的父母是RelativeLayout
Gopal饶,我的父母布局是相对布局 –
@ NeenuJose111那么问题依然存在? –
..是的,错误是存在的。我删除了这行代码(android:layout_alignParentBottom =“true”)。现在错误显示为错误:解析XML时出错:重复属性 –
这个属性是不正确的:机器人:layout_below =“@ + ID/editText1“
我们使用@ + id创建一个新的ID为视图。引用现有的View使用@id。这可能是你错误的原因。
正确的语法是:android:layout_below =“@ id/editText1”
清理您的项目。希望它会修复 –
张贴您的完整xml。 –
转到项目并选择清洁,它会解决问题。 – InnocentKiller