2014-09-23 1 views
-2

안드로이드 애플 리케이션을 처음 사용하는 개발자에게 안드로이드 개발자 사이트에있는 가이드를 따르고 있지만, 코드를 실행하고 싶을 때 "오류가 없습니다"라는 오류 메시지가 나타납니다. 속성 layout_width를 위해 ... 여기 선형 레이아웃 오류 리소스 android : layout_width

<LinearLayout 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" 
android:orientation="horizontal"> 

<EditText android:id="@+id/edit_message" 
    android:Layout_weight="1" 
    android:Layout_width="wrap_content" 
    android:Layout_height="wrap_content" 
    android:hint="@string/edit_message"/> 



<Button 
    android:Layout_width="wrap_content" 
    android:Layout_height="wrap_content" 
    android:text="@string/button_send" /> 

+3

의'layout'하지'Layout' – Raghunandan

+0

사용 THS 안드로이드는 : @Raghunandan로 layout_width = "wrap_content"는 –

+0

내가 당신의'EditText'와'Button'에 오타가 있다고 생각했다. 작은 글자로 'android : layout_width'를 사용했습니다. –

답변

-1
<LinearLayout 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" 
android:orientation="horizontal"> 

<EditText android:id="@+id/edit_message" 
    android:Layout_weight="1" 
    android:Layout_width="wrap_content" 
    android:Layout_height="wrap_content" 
    android:hint="@string/edit_message"/> 



<Button 
    android:Layout_width="wrap_content" 
    android:Layout_height="wrap_content" 
    android:text="@string/button_send" /> 

<LinearLayout/> 
+0

소문자로 변경했습니다. 지금이 메시지가 나타납니다.이 줄에서 여러 주석을 찾을 수 있습니다 : \t - 오류 : 패키지의 속성'Layout_height '에 대한 리소스 식별자가 없습니다. \t 'android' \t - 루트 요소 뒤에 오는 문서의 마크 업은 \t이어야합니다. \t - 오류 : 패키지의 속성 'Layout_width'에 대한 리소스 식별자가 없습니다. \t 'android' – ngoni

1

XML은 대소 문자를 구분 XML 코드의 복사본입니다. 당신은해야, 코드에서 자본 LS가 이 수 :

<LinearLayout 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" 
    android:orientation="horizontal"> 

    <EditText android:id="@+id/edit_message" 
     android:layout_weight="1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:hint="@string/edit_message"/> 

    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@string/button_send" /> 
</LinearLayout> 
관련 문제