2012-03-29 49 views
8

我已经使用Android SDK Manager更新了我的包,并单击了帮助>检查更新和更新的已安装插件。我被提示重新启动Eclipse,并重新启动后,现在,Eclipse Android SDK - 构建工作区时出错

我获得以下错误代码

'Building workspace' has encountered a problem. 
Errors occurred during the build 

Errors occurred during the build. 
Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. 
Bad version number in .class file 
Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 
Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. 
Bad version number in .class file 

回答

4

你一定要有正确的dependencies?你安装了哪个eclipse版本?哪个JRE/JDK用于运行eclipse?

Bad version number表示预期的目标java版本与您使用的目标版本之间存在不匹配(请参阅here)。

+0

在进行这些更新之前,我的环境很好。我有Eclipse版本:3.6.2安装。在“窗口”>“首选项”中,JDK编译器合规性级别为1.6。我该如何纠正Java版本的不匹配?我提到了你提供的链接,但我不知道该怎么做。 – Surekha 2012-03-29 03:30:31

+0

我发布的第一个链接中陈述了预期的(1.6)。你可以用命令'java -version'找到你正在使用的那个。但是,Eclipse启动器可以使用任何已安装的VM,因此也许这不会给出正确的答案。 看起来ADT 17.0.0是第一个需要Java 1.6的应用程序。 – 2012-03-29 03:46:44

+0

在网上搜索了一段时间之后,我认为问题出在ADT 17版上,如[这里]提到的(http://stackoverflow.com/questions/9829008/installing-adt-17-on-windows-7-and-日食的靛蓝的一切,作品精,但是-的)。 – Surekha 2012-03-29 03:47:36

8

我有同样的错误。我再次检查sdk更新,安装它们并在eclipse中检查更新(帮助 - >检查更新)。 重开日食后,我现在恢复了正常。希望这可以帮助

+1

最佳解决方案。 – 2013-05-27 13:23:59

+0

解决方案经过2个小时的搜索。你可能遇到ADT> 22版的lib问题 - > http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt -22 – philipp 2013-10-03 18:02:11

0

在我的情况下,电脑重新启动解决了所有问题,无需重新安装ADT插件。 顺便说一下,我正在使用MAC + ADT_v22

0

我的项目中有一个错误。我只是switch工作区和问题解决。

打开Eclipse。转到文件菜单 - >切换工作区 - >其他并创建一个新的工作区路径。你很好走。