日食/安卓:"运行商对项目的安卓pre编译器'...&QUOT错误;日食、编译器、错误、项目

2023-09-12 00:24:41 作者:原来承诺会过期

尝试做每一次我尝试构建项目的Eclipse抛出了一个对话框说法的Andr​​oid项目我还没有过上一两个月,但一些工作:

Attempting to do some work on an Android project I haven't worked on for a couple of months, yet every time I attempt to build the project Eclipse throws up a dialog saying:

'Building workspace' has encountered a problem

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

我在Mac上运行Eclipse与Android项目建设目标4.0.3(API等级15),我已经安装的东西以下版本

I'm running Eclipse on a Mac with an Android project build target 4.0.3 (API Level 15) and I've the following versions of things installed

在Eclipse中 - 3.7.2 在Android开发工具 - 21.0.1 在Android SDK中 - 高达17

我已经尝试了一些事情,如启动一个全新的工作空间,安装这种颠覆SVN JDT忽略扩展,升级的一切,确保我没有没有在我的源文件夹中扩展名的文件(或任何地方其他),以确保我的Java编译器是1.6和关闭它,并重新打开。

I've already tried a few things, like starting a whole new workspace, installing this 'Subversive SVN JDT Ignore Extensions', upgrading everything, making sure I don't have any files without extensions in my source folder (or anywhere else), ensuring my Java compiler is 1.6 and switching it off and on again.

修改

下面是针对此问题在Eclipse错误日志中的堆栈跟踪:

Here's the stack trace from the Eclipse error log for this problem:

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 constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/onemick/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -data /Projects/_EclipseWorkspace -keyring /Users/onemick/.eclipse_keyring -showlocation

另一个编辑

好了,更多的搜索使我此页面,这表明,这个问题肯定是与文件的presence没有在我的项目的延伸 - 但我不知道哪些文件和我的生命,我找不到任何在该项目!

OK, so more searching led me to this page, which suggests that this issue is definitely related to the presence of files without an extension in my project - however I don't know which file and for the life of me I can't find any in that project!

任何帮助将是很大的AP preciated,我甚至会很高兴,如果有人能解释这是什么错误意味着,我怎么可能会获得有关潜在错误的详细调试信息。

Any help would be greatly appreciated, I'd even be happy if someone could explain what this error means and how I might get more debug info about the underlying error.

推荐答案

我总是讨厌回答我自己的问题,但是这是一个真正的解决方案。

I always hate answering my own questions, but this is a genuine solution.

在21.0.1版本的ADT工具都有prevents一期工程建设,如果您有任何文件,而无需在其中扩展的错误。这是使用Subversion和具有扩展名的文件的用户(比如我)的一个特殊问题。

The 21.0.1 version of the ADT tools has a bug that prevents a project building if you have any files without extensions in them. This is a particular problem for users (like me) using subversion with has extension-less files.

一个建议的解决方案是安装这些'颠覆性'的Eclipse插件(帮助>您的Eclipse版本的网站上安装新的软件>工作>展开'协作'>选择颠覆SVN JDT忽略扩展和颠覆SVN团队提供商)不过这对我来说没有工作(我在靛蓝,也许朱诺它的工作原理)。

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).

解决的办法是安装21.1的 preVIEW 的版本,从谷歌的ADT工具和SDK管理器。清除指令可以在这里 发现,你可以阅读所有的后台添加您的声音的开发者愤怒的暴徒这里

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.