我已经从http://developer.android.com/sdk/index.html下载了ADT,当我按照制作新项目的说明进行操作时,在第7步,当我点击"完成"时,Eclipse会给我一个错误警告框,说
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'Example'.
java.lang.NullPointerException
我遇到了New Project对话框,因为单击Finish会继续给出NPE。即使我单击取消,尝试创建一个新项目,退出Eclipse,然后再次尝试,它总是会出现相同的错误。
我安装了JDK 6和JDK 7。使用ADT Build:v22.6.2-1085508。
以下是Eclipse日志文件的片段(full log):
!ENTRY com.android.ide.eclipse.adt 4 0 2014-06-11 22:40:51.991
!MESSAGE Failed to load properties file for project 'Example'
!ENTRY org.eclipse.core.resources 4 75 2014-06-11 22:40:51.993
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2014-06-11 22:40:51.993
!MESSAGE Errors running builder 'Android Resource Manager' on project 'Example'.
!STACK 0
java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.abortOnBadSetup(BaseBuilder.java:327)
at com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder.build(ResourceManagerBuilder.java:92)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
答案 0 :(得分:1)
这似乎是Maverics的常见错误:LINK。我已经尝试了解决它的一切:重新安装Eclipse和SDK,重新安装Java,切换工作区,在Eclipse和SDK Manager中执行更新。我认为除了等待更新之外,我们现在还能做些什么......
答案 1 :(得分:0)
我建议创建新工作区或切换到另一个工作区。以下是更改工作区的方法:https://stackoverflow.com/a/7234686/2741586。
如果问题仍然存在,则ADT可能存在严重问题。尝试更新MAC中的SDK和Java或下载更新的ADT。
祝你好运!