【发布时间】:2013-08-17 14:33:16
【问题描述】:
遇到上述错误。followed this
但没有找到解决方案。检查了我的资源文件,但几乎没有任何用处建议我解决这个问题。这里放置 activity_main.xml 和
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="87dp"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button1"
android:layout_centerVertical="true"
android:text="Button2" />
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button2"
android:layout_below="@+id/button2"
android:layout_marginTop="52dp"
android:text="Button" />
</RelativeLayout>
【问题讨论】:
-
actity_main.xml只是问题中的拼写错误还是文件的真实名称? -
你能在Java中显示你在哪里使用它,错误在哪里。另外,尝试清理你的项目,“Project --> Clean...”
-
@codeMagic 附上截图,右击查看图片
-
@codeMagic 是的,也尝试过清理并重新启动 eclipse