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

linearlayout과 relativelayout문제요ㅜ

0 추천

처음 프로젝트를 생성하면 relativelayout으로 생성되는데 제가 독학하고 있는 책에서는

linearlayout으로 전부 되어 있더라구요.

그래서 relativelayout 처음 생성될때 다 지우고 linearlayout이랑 똑같이 했는데 앱실행이 안되더라구요

자꾸 예상치못한 오류로 멈추더라구요 왜그런가요..?

string이랑 main xml만 수정해서 사용하고 있구요 처음 헬로 안드로이드할때는 되던데

다른 한글로 바꾸면 또 안되더라구요.

========================================

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">Test_textView</string>
    <string name="action_settings">Settings</string>
   
    <string name="text">Hello !</string>
    <string name="exam">world !</string>
 

</resources>

 

============================================

<?xml version="1.0" encoding="utf-8"?>
<LinearLyout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
   

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/text"
        android:textColor="#00ff00"
        android:textSize="20pt"
        android:textStyle="italic"
        />
   
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/exam"
        android:textSize="20sp"
        android:background="#ff0000"
        />   
       
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="안녕하쇼,반갑쇼" <<에러 string 이용안하고 바로 할 수 있는걸로 알고있는데 안되더라구요
        android:textColor="#700000ff"
        android:textSize="5mm" <<에러 mm는 쓸 수없다고 나오더라구요
        android:typeface="serif"
        />

        </LinearLyout>

익명사용자 님이 2013년 2월 22일 질문

1개의 답변

+1 추천
<LinearLylout> 오타아닌가요 Layout으로 되야죠...
네오링크 (160 포인트) 님이 2013년 2월 22일 답변
아하아하하하 감사해요!!! 진짜
고쳤더니 에러가 싹 날라가는데

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="안녕하쇼,반갑쇼"
        android:textColor="#700000ff"
        android:textSize="5mm"
        android:typeface="serif"
        />

여기서 한글이랑 mm에서는 에러가 그대로네요 ㅜ
Clean이나 이클립스 재시작해보세용
감사합니당 ㅎㅎ 오늘처음프로그래밍을 시작해서요 너무 허접한 질문이었네욤 ; ㅋ
...