Android編譯錯誤, Ignoring InnerClasses attribute for an anonymous inner class


今天在做android項目時,加入第三方包,一編譯就報錯。
錯誤如下:
[2012-01-13 14:51:25 - xxx] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.xxx.xxx.xxx$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.


Failed to load properties file for project 'xxx'


於是我把注意力放到第三方包可能加錯的情況中。於是按照網上的說法,將包都重新加了一遍還是報錯。

最后發現是debug證書的問題。我到C:\Users\xxx\.android\debug.keystore目錄下看到

 

大家可以看到debug.keystore的日期是 2011-1-11,而今天是2012-1-13日,果然如網上所說,超過了一年,debug證書過期了。

於是我刪掉這個文件,重新編譯運行,果然沒問題了,而此時 該目錄又重新生成了debug.keystore,日期是今天。

 

如果你想重現這個問題,也很簡單,必須clear工程,否則它不會再到該目錄下裝載證書,即使你把這個文件換成2010的也不會不錯,而你clear后,

項目會重新裝載證書,檢測證書的有效期。希望對大家有所幫助。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM