2017-10-06 40 views
-1

如何解決以下gradle警告?我通過這條線增加了庫:如何解決gradle警告:忽略匿名內部類的InnerClasses屬性

implementation 'org.apache.commons:commons-collections4:4.1' 


Warning:warning: Ignoring InnerClasses attribute for an anonymous inner class 
(org.apache.commons.collections.ReferenceMap$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. 

回答

2

嘗試添加-keepattributes InnerClasses在您的ProGuard配置

編輯:嘗試用-dontoptimize