Android 错误:未找到属性';对齐底部';包装内';安卓&x27;
我是android开发新手…我有一个错误,就是在包“android”中找不到属性“alignParentBottom”的资源标识符。我的布局代码如下Android 错误:未找到属性';对齐底部';包装内';安卓&x27;,android,android-layout,button,Android,Android Layout,Button,我是android开发新手…我有一个错误,就是在包“android”中找不到属性“alignParentBottom”的资源标识符。我的布局代码如下 <Button android:id="@+id/button1" android:layout_width="90dp" android:layout_height="wrap_content" android:layou
<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".
不是
并确保
按钮
的父项是一个RelativeLayout
此属性不正确:android:layout_below=“@+id/editText1”
我们使用@+id为视图创建新id。若要引用现有视图,请使用@id。这可能是导致错误的原因
正确的语法是:android:layout_below=“@id/editText1”清理您的项目。希望它将修复转到project并选择clean,它将修复问题。您的父布局是什么??它是线性布局还是相对布局?事实上,我已经尝试过了。但错误仍然存在。我的R.java文件也不在那里。它是相对布局到Gopal Rao,我的父布局是相对布局layout@NeenuJose111那么问题仍然存在吗?是的,错误是存在的。我删除了那行代码。(android:layout\u alignParentBottom=“true”)。现在错误显示为类似错误:解析XML时出错:重复属性
android:alignParentBottom="true"