안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요?
갑자기 코딩 중에 리소스들을 몾찾는 에러가 생겨서 R를 체크해 보니까 업데이트가 되지 않길 래 project clean하니까 이번에는 생성이 되지 않았습니다. AndroidManifest.xml이 잘못 되었을 때 이런 증상이 나는 걸로 알고 있는데요, 이클립스에서 validate 를 실행시키면 정상입니다. 어디가 잘못된 것으로 제 육안으로는 보이지 않습니다. 에러메세지에는
W/ResourceType( 413): Bad XML block: no root element node found
로 나옵니다. 어디 XML파일에 문제가 생긴 것 확실할 것 같은데 수많은 XML파일을 어떻게 다 확인을 해야할지 모르겠습니다. 혹시 이 문제 해결하는 방법 아시면 답변 좀 부탁드립니다. 감사합니다.




구글 안드로이드 개발자 그룹에서 다음과 같은 내용을 찾았습니다.
I found some old posts on this problem, and I was having a similar issue, so
I thought I'd share what I learned.
I was getting this error after modifying an XML file, and I was unable to
start a debug session until I fixed the problem. It seems if there are
errors that cause aapt to fail, eclipse can get in a state where it doesn't
know when the problem gets fixed. Deleting R.java did not work for me.
What I ended up doing after I fixed the XML file is right-clicking on the
error message in the Problems view, and deleting the error. Then modify
some files to force a rebuild and you should be okay.
I found it helps to turn the android log level to Verbose (Preferences ->
Android -> Build). This led me to know that once I fixed the XML file, aapt
was happy, but eclipse was not.
Hopefully this will save someone else the 3 hours I burned trying to figure
it out!
제가 겪는 상황과 동일하구요. 저는 fresh한 이클립스를 다시 깔아서 프로젝트 불러오니 정상적으로 동작을 하고 있습니다. 이클립스 버그가 맞는 것 같습니다.