2012-03-29 47 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。轉到文件菜單 - >切換工作區 - >其他並創建一個新的工作區路徑。你很好走。