當設置我的機器在Android上工作我不能讓代碼「編譯」,或者它正在編譯和停止在其他一些進程,因爲它當它說「生成classes.dex」時會給出錯誤。Android編譯錯誤,當「生成classes.dex ....」
我得到的錯誤是:
Information: Note: Some input files use unchecked or unsafe operations.
Information: Note: Recompile with -Xlint:unchecked for details.
Information: Compilation completed with 12 errors and 2 warnings
Information: 12 errors
Information: 1 warning
Error: (org.joda.time.DateTimeZone$1) that doesn't come with an
Error: associated EnclosingMethod attribute. This class was probably produced by a
Error: compiler that did not target the modern .class file format. The recommended
Error: solution is to recompile the class from source, using an up-to-date compiler
Error: and without specifying any "-target" type options. The consequence of ignoring
Error: this warning is that reflective operations on this class will incorrectly
Error: indicate that it is *not* an inner class.
Error: (junitx.extensions.TestSetup$1) that doesn't come with an
Error: (junitx.ant.TestClassValidatorTask$1) that doesn't come with an
Error: (junitx.util.AbstractSuiteBuilder$1) that doesn't come with an
Error: (junitx.framework.TestSuite$1) that doesn't come with an
Error: (junitx.tool.TestClassValidator$1) that doesn't come with an
Warning: warning: Ignoring InnerClasses attribute for an anonymous inner class
有趣的是,該代碼在我們那是建立looong時間以前,沒人記得這事的另一臺計算機編譯正確。
我瘋狂搜索,每個人都說你需要從源代碼JodaTime和其他任何東西重新編譯,但這不可能是這種情況,因爲相同的代碼(複製並粘貼或從版本控制下載)完美地工作在另一個機器,所以必須對我的環境造成影響,但我不知道要尋找什麼。
那裏的任何專家認識到這種類型的錯誤?
你有過這種事嗎?你怎麼修好它的 ??
請幫助...
注:
- 使用的是IntelliJ
- 編譯爲Android 1.6
之前有人指出出來,我知道了類似的問題已經被問過。這裏例如:Recompile jodatime?。但在這種情況下,擬議的解決方案是重新編譯JodaTime的來源。我認爲這不是這種情況,因爲代碼在一臺計算機中運行,而不是在另一臺計算機上運行。
你使用的是eclipse嗎? – bytebender 2011-04-21 15:35:44
我正在使用Intellij。 – bluediapente 2011-04-21 15:46:38
可能與您正在使用的jdk版本有關。你可以檢查您的計算機上的jdk版本,以及它工作的另一個版本 – Josnidhin 2011-04-25 14:36:31