[英]error: No resource identifier found for attribute 'layout_toLeftof' in package 'android'
為什么會出現此錯誤?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
...
<EditText
android:id="@+id/text_spent1"
android:layout_width="100dp"
android:layout_marginTop="20dp"
android:layout_height="wrap_content"
android:layout_below="@+id/groc_store"
android:layout_centerInParent="true"
android:hint="-"
android:inputType="number"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftof="@+id/text_spent1"
android:layout_below="@+id/groc_store"
android:text="Spent: $"
/>
...
</RelativeLayout>
我也嘗試了android:layout_toRightof
但是對於layout_toRightof
屬性,我得到了同樣的錯誤消息。 我也嘗試只使用"@id/text_spent1"
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.