Android Ant打包打入第三方包报错解决方案
在做项目的时候,使用到第三方包,在混淆打包的时候一直报第三方包的warning, 导致最后BUILD FAIL. 部分warn信息
[proguard] Warning: android.support.v4.view.accessibility.AccessibilityManagerCompatIcs$1: can't find superclass or interface android.view.accessibility.AccessibilityManager$AccessibilityStateChangeListener [proguard] Warning: android.support.v4.view.accessibility.AccessibilityEventCompatIcs: can't find referenced method 'int getRecordCount()' in class android.view.accessibility.AccessibilityEvent [proguard] Warning: android.support.v4.view.accessibility.AccessibilityEventCompatIcs: can't find referenced class android.view.accessibility.AccessibilityRecord [proguard] Warning: android.support.v4.view.accessibility.AccessibilityEventCompatIcs: can't find referenced method 'void appendRecord(android.view.accessibility.AccessibilityRecord)' in class android.view.accessibility.AccessibilityEvent [proguard] Warning: android.support.v4.view.accessibility.AccessibilityEventCompatIcs: can't find referenced method 'android.view.accessibility.AccessibilityRecord getRecord(int)' in class android.view.accessibility.AccessibilityEvent [proguard] Warning: android.support.v4.view.accessibility.AccessibilityNodeInfoCompatIcs: can't find referenced class android.view.accessibility.AccessibilityNodeInfo
几经折腾,终于找到有效的方法。
根据上面的warning信息
打开proguard.cfg,加入-dontwarn
android.support.v4.view.accessibility.*
如果还有其他警告,一个个加入即可。
也可以直接加入 -dontwarn
保存,再次打包即可
相关推荐
zyygive 2019-12-30
shinecjj 2015-06-13
learningITwell 2011-12-30
易辰Android 2011-11-13
易辰Android 2012-04-20
RickyLee 2015-01-02
yuyu00 2019-06-29
知其然知其所以然 2012-08-10
afa0 2019-06-21
mlsnatalie 2018-03-15
zyygive 2017-01-03
蓝天梦 2015-09-06
tdltdltdl 2015-08-14
mscn 2015-06-13
LXLYHM 2013-12-12
wolfoxkao 2013-10-28
NatureDay 2013-07-21