your programing

android sdk main.out.xml 파싱 오류?

lovepro 2021. 1. 5. 19:46
반응형

android sdk main.out.xml 파싱 오류?


Android 개발을 계속 배우기 위해 새로운 Android 프로젝트 인 "WeekendStudy"를 시작했고 기본 'hello weekendstudy'컴파일 / 실행을 컴파일하는 데 어려움을 겪었습니다. 구성 및 설정 단계를 놓친 것 같지만 어디에서 찾을 수 없습니다. AVD가 구성, 설정 및 시작되었습니다.

'실행'을 누르면 SDK가 main.out.xml 파일을 빌드하고 다음과 같이 실패합니다.

[2010-03-06 09:46:47 - WeekendStudy]Error in an XML file: aborting build.
[2010-03-06 09:46:48 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined.
[2010-03-06 09:46:48 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here.
[2010-03-06 09:46:48 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found
[2010-03-06 09:48:16 - WeekendStudy]Error in an XML file: aborting build.
[2010-03-06 09:48:16 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined.
[2010-03-06 09:48:16 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here.
[2010-03-06 09:48:16 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found
[2010-03-06 09:55:29 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined.
[2010-03-06 09:55:29 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here.
[2010-03-06 09:55:29 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found
[2010-03-06 09:55:49 - WeekendStudy]Error in an XML file: aborting build.
[2010-03-06 09:55:49 - WeekendStudy]res/layout/main.xml:0: error: Resource entry main is already defined.
[2010-03-06 09:55:49 - WeekendStudy]res/layout/main.out.xml:0: Originally defined here.
[2010-03-06 09:55:49 - WeekendStudy]/Users/mobibob/Projects/workspace-weekend/WeekendStudy/res/layout/main.out.xml:1: error: Error parsing XML: no element found

더 나은 수정 : Eclipse-> Window-> Preferences-> Run / Debug-> Launching-> Lauch Configuration

교차 : 확인 된 실행 구성 유형 필터링 및 교차 : XSL (목록 끝에 있음)

문제를 영원히 없애십시오!


그래, 나도 같은 문제 야.

out.xml이 생성되지 않도록합니다.

  1. XML 파일 편집, 완벽하게 자연스러운 일 ....

  2. XML 파일 저장 및 닫기

  3. src /에서 .java 파일을 엽니 다.

  4. 파일을 두 번 클릭하여 포커스가 있고 커서가 거기에 있는지 확인합니다.

  5. 실행 ... 이제 괜찮을 것입니다

이런 일이 생기면 이렇게 ...

  1. XML 파일 편집, 완벽하게 자연스러운 일 ....

  2. 실행 ... 두려운 out.xml 파일로 인해 충돌

  3. /res/___.out.xml 파일 삭제

  4. IDE보기에서 모든 파일 닫기

  5. 프로젝트 ... 청소 ...

  6. src /에서 .java 파일을 엽니 다.

  7. 파일을 두 번 클릭하면 포커스가 있고 커서가 거기에 있습니다.

  8. 실행 ... 이제 괜찮을 것입니다


아이콘을 클릭 할뿐만 아니라 Android 애플리케이션으로 프로젝트를 실행해야합니다.


xxx.out.xml을 삭제했지만 여전히 실행할 수 없다면이 Eclipse-> Project-> Clean ...-> Choose your project-> OK를 따르십시오.

* .java에 커서를 놓고 실행하십시오.


내 도구 모음이 올바르게 연결되지 않았기 때문에 프로젝트의 잘못된 부분에서 실행하려고했습니다. 나는 여전히 세부 사항을 해결하고 있으며 완전히 파악하면 이것을 편집 할 것입니다.

우선, 이것은 다른 관련되지 않은 프로젝트를 구성하기 위해 만들고 싶었던 새로운 작업 공간이었습니다. 결과적으로 툴바의 RUN에 타겟이 구성되지 않았으므로 (즉, 히스토리에서) 내 main.xml 파일을 실행하려고했습니다.

* .java 파일 중 하나를 마우스 오른쪽 버튼으로 클릭하고 '다음으로 실행 ...'을 선택하면 대상 (AVD 선택 또는 생성), 프로젝트 등으로 실행 구성을 만들 수 있습니다. 각 탭을 방문하는 것이 좋습니다. 상황에 대한 기본값을 검토하십시오.

그런 다음 앉아서 에뮬레이터가 처음으로로드 될 때까지 기다립니다 (Macbook에서는 약 1 ~ 2 분 걸렸습니다).


이것은 eclipse의 XML 플러그인 중 하나의 문제인 것 같습니다. Web Tools에있는 것 같습니다. 예전에는 XML이나 Java 등 모든 파일에서 앱을 실행할 수 있었지만 웹 도구를 설치하면이 오류가 표시되기 시작했습니다. 정말 성가신 일입니다. Ctrl-F11을 눌러 앱을 빌드하는 데 익숙하지만 XML 파일에서 그렇게하면이 오류가 발생합니다. 위에서 언급 한 수정 사항은 작동하지만 프로젝트를 마우스 오른쪽 단추로 클릭하고 다음 계정으로 실행 ...을 선택하는 것은 추가 단계이며 덜 효율적입니다. 누구든지 웹 도구를 제거하는 것 외에도 내 바로 가기 키를 되찾기 위해 깨끗한 솔루션을 알아 내면 감사 할 것입니다.


저는 Android 앱 개발 학습에 익숙하지 않습니다. 나도이 문제에 직면했고 좌절했다. 전체 Android SDK를 제거하고 다시 설치하십시오. 문제가 있다고 생각합니다.

To my surprise, solution is very simple. If you leave the mouse click over xml file and go to Run it will generate error. So the solution is simple. Click on .java file or Top of the whole tree (example: if the structure is like this: Firstapp>Src>Firstapp.java, just click on Firstapp) and then run.

It will run smoothly.


@neil patel > Just restating the answer above ... let me know if it needs to be clarified.

Right-click on one of the *.java files and select 'run as...' then you can create a run configuration with its target (pick or create an AVD), the project, etc. I recommend visiting each of the tabs and review the defaults for your situation.


I had the same problem and tried alot of different things. Finally I gave up, copied the entire project tree to another location. Created a new Android project and copied the src files, res.layout, res.values files and my added custom images under drawable. Right clicked the project in package explorer and hit "Refresh". Now it works again. Probably not the best way to fix it but it works :-)


Here is a blog post that I just found which solves the problem definitely!


I believe I have the answer. I too was able to run with just any ol' file selected. Something changed and suddenly I was getting the dreaded xxx.out.xml parse error. Well, I found a way around it. Someone please confirm for me that this works for you too.

Click Window->Preferences Select or filter search for Launching(run/debug)

In the bottom of the right hand pane, look for Lauch Operation and select "Always launch the previously launched application"

Clean your project and run it correctly at least once. I tested this out and it seems to work consistently.

Cheers


Do try, and check the valid source is running or not.

Deleted the xxx.out.xml, if still can't run, please follow this Eclipse ->Project->Clean...->Choose your project->OK


I was also facing this issue.

When using eclispe make sure before clicking "Run", Any file selected in Project is not the XML file.With this you will never get this error. Also, Make sure you have deleted all the ....out.xml from your workspace.

I spend almost 30 Min to know the root cause of this and found this solution.


I faced this problem but above answers do not help me. After look around, I fixed this by my self and I think I should write down the solution.

The android compiler create *.out.xml if you run the project as XSL. to fix this, you should do these steps:

  • click on the arrow at right side of Run button, select Run Configurations. At the left side of popup windows, delete all sub-items under XSL.
  • go to Launch configuration under preferences=>Run/debug =>Launching. Check to "Filter checked launch..." and then, uncheck XSL when keeping check on Android Application.

Hope this helps.


As stated in How to stop Eclipse from trying to run XML files?: Under Preferences -> Run/Debug -> Launching, you can select "Always launch the previously launched application". This is useful if you tend to use the Ctrl+F11 shortcut.


Eclipse ->Project->Clean...restart your project ,and that's ok


I had the same problem as wall , my solution was :

Just import it again without creating new project

first try do do that:

Eclipse ->Project->Clean...->Choose your project->OK

If that didn't work, try this..

1.copy the project folder from workspace to some where else (desktop will be fine) 2.delete project from eclipse (checked the box "delete Project content from disc" ) 3.copy the project again just this time from desktop to workspace 3.import the project again (File>>Import>>General>> Existing project into workspace ) 4.that's worked for me ..

hope it helped

ReferenceURL : https://stackoverflow.com/questions/2393103/android-sdk-main-out-xml-parsing-error

반응형