1
使用Eclipse GUI编辑布局后,出现一个奇怪的问题。它告诉我,找不到资源tvVersionLabel
。任何明显的事情?android:layout_toRightOf资源未找到
<TextView
android:id="@+id/tvVersionLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="center"
android:text="Version: "
android:textColor="@color/light_gray"
android:textSize="13dip" />
<TextView
android:id="@+id/tvVersionNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tvVersionLabel"
android:gravity="center"
android:text="default"
android:textColor="#ffffff"
android:textSize="13dip" />
使用本 - '机器人:layout_toRightOf = “@ + ID/tvVersionLabel”' – ryderz8
是'TextView's真的在你的布局这个命令?它应该以这种方式工作。如果命令被切换,即在声明它之前指向另一个命令,您将遇到此错误消息。解决这个问题的一种方法是在引用中使用“@ + id/...”,或者只是修改声明/引用顺序。 – laalto
请看我编辑的答案。 – TheLittleNaruto