안드로이드 개발 질문/답변
(글 수 45,052)
헬로우 찍고 나서
그 어플리케이션 부분을 약간 수정하는 건데
텍스트뷰쪽 이요..
이클립스 상에서 xml을 보면 에러발생부분 없는데..
Run 시키면 main.out.xml 파일이 생성되면서
C:\Documents and Settings\Administrator\workspace\yiyunju\res\layout\main.out.xml:1: error: Error parsing XML: no element found
라고 나오는데..
뭐가 문제일까요.?
텍스트뷰쪽은 안사에 강좌있는곳있는거 보고 그대로 따라했었는데.
// xml 파일 코드예염
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/hello"
android:background="#FF0000FF" <-- 요기서 부터 밑에 center 까지만 고치고 나머지는 하나도 안건드렸어요
android:textSize="20dp"
android:textStyle="bold"
android:gravity="center"
/>
</LinearLayout>
그 어플리케이션 부분을 약간 수정하는 건데
텍스트뷰쪽 이요..
이클립스 상에서 xml을 보면 에러발생부분 없는데..
Run 시키면 main.out.xml 파일이 생성되면서
C:\Documents and Settings\Administrator\workspace\yiyunju\res\layout\main.out.xml:1: error: Error parsing XML: no element found
라고 나오는데..
뭐가 문제일까요.?
텍스트뷰쪽은 안사에 강좌있는곳있는거 보고 그대로 따라했었는데.
// xml 파일 코드예염
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/hello"
android:background="#FF0000FF" <-- 요기서 부터 밑에 center 까지만 고치고 나머지는 하나도 안건드렸어요
android:textSize="20dp"
android:textStyle="bold"
android:gravity="center"
/>
</LinearLayout>
main.out.xml은 지우시고... .java파일에서 실행 누르세요..