developer tip

Eclipse / Android :“프로젝트에서 'Android Pre Compiler'빌더 실행 오류…”

optionbox 2020. 8. 23. 08:59
반응형

Eclipse / Android :“프로젝트에서 'Android Pre Compiler'빌더 실행 오류…”


Android 프로젝트에서 몇 달 동안 작업하지 않은 작업을 시도하려고 시도했지만 Eclipse 프로젝트를 빌드하려고 할 때마다 다음과 같은 대화 상자가 표시됩니다.

'Building workspace' has encountered a problem

Errors occurred during the build.
Errors running builder 'Android Pre Compiler' on project 'XXX'
java.lang.NullPointerException

Android 프로젝트 빌드 대상 4.0.3 (API 레벨 15)이있는 Mac에서 Eclipse를 실행하고 있으며 다음 버전의 항목이 설치되어 있습니다.

  • 이클립스-3.7.2
  • Android 개발 도구-21.0.1
  • Android SDK-최대 17 개

나는 이미 완전히 새로운 작업 공간을 시작하고,이 'Subversive SVN JDT Ignore Extensions'를 설치하고, 모든 것을 업그레이드하고, 내 소스 폴더 (또는 다른 곳)에 확장자가없는 파일이 없는지 확인하는 것과 같은 몇 가지 작업을 이미 시도했습니다. 내 Java 컴파일러가 1.6인지 확인하고 다시 켜고 끕니다.

편집하다

이 문제에 대한 Eclipse 오류 로그의 스택 추적은 다음과 같습니다.

java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:673)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:432)
at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:305)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

그리고 세션 데이터 :

eclipse.buildId = M20120208-0800
java.version = 1.6.0_37
java.vendor = Apple Inc.
BootLoader 상수 : OS = macosx, ARCH = x86_64, WS = cocoa, NL = en_US
프레임 워크 인수 : -keyring /Users/onemick/.eclipse_keyring -showlocation
명령 줄 인수 : -os macosx -ws cocoa -arch x86_64 -data / Projects / _EclipseWorkspace -keyring /Users/onemick/.eclipse_keyring -showlocation

다른 편집

좋아, 그래서 더 많은 검색이 나를 이 페이지로 이끌었고 , 이것은이 문제가 내 프로젝트에 확장자가없는 파일의 존재와 확실히 관련이 있음을 시사합니다. 그러나 나는 어떤 파일을 찾을 수 없으며 내 인생에서 찾을 수 없습니다. 그 프로젝트의 모든 것!

누군가이 오류의 의미와 기본 오류에 대한 더 많은 디버그 정보를 얻을 수있는 방법을 설명 할 수 있다면 기쁠 것입니다.


ADT의 미리보기 버전을 설치하지 않으려는 경우 여기에 설명 된 해결 방법이 있습니다 .

  1. Eclipse에서 프로젝트 속성을 연 다음 리소스-> 리소스 필터를 엽니 다.
  2. "추가 ..."버튼 클릭-> "모두 제외", "파일 및 폴더", "모든 하위 항목"을 선택합니다. 텍스트 입력 상자에 ".svn"(따옴표 제외)을 입력합니다.
  3. Eclipse를 다시 시작하십시오.

.git 폴더 와 동일한 문제가 있었는데 매력처럼 작동했습니다.


나는 항상 내 질문에 대답하는 것을 싫어하지만 이것은 진정한 해결책입니다.

21.0.1 버전의 ADT 도구에는 확장자가없는 파일이있는 경우 프로젝트 빌드를 방해하는 버그가 있습니다. 이것은 확장자가없는 파일을 가진 subversion을 사용하는 사용자 (나와 같은)에게 특별한 문제입니다.

One recommended solution is to install these 'subversive' Eclipse plugins (Help > Install new Software > Work with your Eclipse version site > Expand 'Collaboration' > Choose 'Subversive SVN JDT Ignore Extensions' and 'Subversive SVN Team Provider') but this didn't work for me (I'm on Indigo, perhaps on Juno it works).

The solution is to install the 21.1 preview version of the ADT tools and SDK manager from Google. Clear instructions can be found here and you can read all the background add your voice to the angry mob of developers here.


I just restarted Eclipse and the problem got solved.


I also had the same problem and i realised that i had closed another project that was connected with the one I was building. Once i opened it everything disappeared.


May be you have close 'appcompact_v7' library to create new file. this solved my problem by open it back


I meet this error,and delete all .svn file, my project can't work,when process 55%

and I find this is an empty res dir in my project,I don't know how it coms,but when delete the empty res dir,my project workd,

so,you should check all your files in your project.


I was also facing the same issue, and wasted a lot of time fixing this, also the above given solutions doesn't work for me. I solved this problem by going to Eclipse -> Help -> Check for updates, and then restarting eclipse after update finished.


If you have accidentally closed the library projects that are essential for running your project then just open them in eclipse. This error must vanish.


Another case: I closed the current project (with building error message), discarded the SVN repository in use, recompile:

Building error

I add the repository location:

Building ok!


For solving this issue I need to run eclipse as administrator


i encountered this problem recently and the solutions given above did not work for me. i did not have any files without extensions. It so happened that after adding a new project from existing code, there was a setup error that seems to have messed up the state of eclipse. After that, any project in the workspace that i tried to clean or build was giving the Android Pre-Compiler error with the java.lang.NullPointerException.

i found that the main.xml files inside /res directory was for some reason not being found, even though the file was very much there. Solution was to close all open file perspectives in the Eclipse Java Edit Panel, close all projects, then open project and open the main xml file. After i did that, the Pre-Compiler problem went away.

참고URL : https://stackoverflow.com/questions/14455018/eclipse-android-errors-running-builder-android-pre-compiler-on-project

반응형