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

來源:互聯網
上載者:User

標籤:

今天在做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後,

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

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.