Errors occurred during the build.
Errors running builder 'Android Pre Compiler' on project 'com.xxx.android.xxx'.
com/android/sdklib/util/SparseArray
当我尝试构建项目时,我从今天开始收到此错误。这不仅仅是针对所有项目的Android项目。
知道发生了什么事吗?这在昨天工作,但今天我无法在工作区上构建任何项目。
下面是eclipse日志文件。
ENTRY org.eclipse.core.resources 4 75 2013-10-07 10:09:12.562
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2013-10-07 10:09:12.562
!MESSAGE Errors running builder 'Android Pre Compiler' on project 'com.xxx.android.xxx'.
!STACK 0
java.lang.NoClassDefFoundError: com/android/sdklib/util/SparseArray
at com.android.ide.eclipse.adt.internal.resources.manager.DynamicIdMap.<init>(DynamicIdMap.java:29)
at com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources.<init>(ProjectResources.java:67)
at com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources.create(ProjectResources.java:74)
at com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.getProjectResources(ResourceManager.java:160)
at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.doClean(PreCompilerBuilder.java:772)
at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.clean(PreCompilerBuilder.java:741)
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:422)
at org.eclipse.ui.internal.ide.dialogs.CleanDialog.doClean(CleanDialog.java:313)
at org.eclipse.ui.internal.ide.dialogs.CleanDialog$1.runInWorkspace(CleanDialog.java:151)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
答案 0 :(得分:1)
在eclipse菜单上,帮助&gt;检查更新。
的评论答案 1 :(得分:1)
Eclipse平台 版本= 4.2.0。我使用的是Android SDK 4.3和4.2.2。 网上没有任何对我有用的东西。试图按照论坛中的建议更新日食和更多设置更改。
最终我使用了一次全新的日食。这是唯一的方法。
答案 2 :(得分:0)
在我的情况下,simillar错误是由eclipse产生的,当我在课堂上只写
时import
这会导致文件中的编译无效,而不是有问题的编译。