我在Android Studio中構建我的代碼時遇到此警告。
幾次他們沒有出現,但他們大多數時間。Android警告 - 忽略InnerClasses屬性(jnamed)
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed$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.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed$2) 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.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(jnamed$3) 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.
我讀過的其他問題,其中包括這些在我的ProGuard文件:
-keepattributes EnclosingMethod
-keepattributes InnerClasses
但是他們並沒有幫助。
編輯:
如果這是不可能解決這個問題,請告訴我如何隱藏在postguard此警告(或任何其他方式)。謝謝!
嗨,你有沒有看到這個? http://stackoverflow.com/questions/30999337/android-studio-and-gradle – Jaco
嗨。不,我沒有,但那不相關。它沒有幫助。請刪除我的問題的投票,以便我可以在這裏得到答案。謝謝! –
對不起GyörgyBenedek,我沒有加你倒票 – Jaco