마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

xml때문에 예상치 못하게 종료될 수 있나요?

0 추천
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="3sp">
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    >
     <EditText
         android:layout_height="wrap_content"
         android:text="이름"
         android:textSize="20sp"
         android:layout_weight="3"
         />
     <Button
         android:layout_height="wrap_content"
         android:text="검색"
         android:textSize="20sp"
         android:id="@+id/find"
         android:layout_weight="1"
         />  
 </LinearLayout>

    <ListView
        android:id="@+id/listview"
        android:layout_width="match_parent"
        android:layout_weight="1" >
    </ListView>

   
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="추가"
        android:textSize="20sp"
        android:id="@+id/add"
        android:onClick="mOnClick"
     />   
 
</LinearLayout>

xml 코드가 이런데요

전화번호부를 만들어보려고 하는데 프로젝트 생성하고

hello world나온 상태에서 실행시키면 아무 문제없고

바로 xml만 저렇게 수정하고 실행시키면 예상치못하게 종료되었다고 뜨면서 앱이 종료되네요 ㅠㅠ

그래서 xml에 문제가 있는것 같아 xml만 올립니다.

근데 그래픽 생성도 잘 되고 어디에 오류가있다고 뜨지도 않아서 질문드립니다 ㅠㅠ

 

yongjun (120 포인트) 님이 2014년 9월 6일 질문

1개의 답변

0 추천
두번째 리니어 레이아웃에 xmlns:android="http://schemas.android.com/apk/res/android 는 빼세요
aucd29 (218,390 포인트) 님이 2014년 9월 15일 답변
...