[英]No resource identifier found for attribute 'layout_width' in package 'android' / new pacakge
我一直在嘗試找出代碼有什么問題,但是,我現在一無所知,幾乎檢查了所有內容,在嘗試為我的應用程序構建登錄頁面時出現此錯誤。 對於給您帶來的任何不便,我們深表歉意,我對此一竅不通。
在 package“android”中找不到屬性“layout_width”的資源標識符。 (第 2 行)
以及與 java 不同的錯誤,用於為應用程序部署主題:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.6"
android:background="@color/uberPrimary"
>
<Refractored.Controls.CircleImageView
android:id="@+id/circleImageView1"
android:layout_height="200dp"
android:layout_width="180dp"
android:layout_centerInParent="true"
android:src="@drawable/centerimage"
/>
<TextView
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:gravity="center"
android:textSize="20sp"
android:layout_below="@+id/circleImageView1"
android:layout_alignParentBottom="true"
android:textColor="@color/uberwhite"
/>
</RelativeLayout>
<LinearLayout
android:orientation="vertical"
android:layout_height="0dp"
android:layout_width="match_parent"
android:layout_weight="0.4"
android:padding="10dp"
>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/emailText"
>
<EditText
android:layout_height="wrap_content"
android:layout_widht="match_parent"
android:hint="Email"
android:inputType="textEmailAddress"
/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/passwordText"
>
<EditText
android:layout_height="wrap_content"
android:layout_widht="match_parent"
android:hint="Password"
android:inputType="textPassword"
/>
</android.support.design.widget.TextInputLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/loginButton"
android:layout_height="45dp"
android:layout_width="300dp"
android:text="Login"
android:textColor="@color/uberwhite"
android:background="@drawable/uberroundbutton"
android:layout_centerInParent="true"
/>
</RelativeLayout>
</LinearLayout>
改變
<EditText
android:layout_height="wrap_content"
android:layout_widht="match_parent"
android:hint="Email"
android:inputType="textEmailAddress"
/>
到
<EditText
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:hint="Email"
android:inputType="textEmailAddress"
/>
感謝@laalto
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.