服务器之家

服务器之家 > 正文

android4.0混淆XmlPullParser报错原因分析解决

时间:2021-01-24 12:14     来源/作者:Android开发网

复制代码 代码如下:


[2013-05-20 17:30:52 - danielinbiti] Proguard returned with error code 1. See console
[2013-05-20 17:30:52 - danielinbiti] Note: there were 67 duplicate class definitions.
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.content.res.ColorStateList depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.graphics.drawable.ShapeDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.graphics.drawable.ShapeDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.util.Xml depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.util.Xml depends on program class org.xmlpull.v1.XmlSerializer
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.util.Xml depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2013-05-20 17:30:52 - danielinbiti] You should check if you need to specify additional program jars.
[2013-05-20 17:30:52 - danielinbiti] Warning: there were 16 instances of library classes depending on program classes.
[2013-05-20 17:30:52 - danielinbiti] You must avoid such dependencies, since the program classes will
[2013-05-20 17:30:52 - danielinbiti] be processed, while the library classes will remain unchanged.
[2013-05-20 17:30:52 - danielinbiti] java.io.IOException: Please correct the above warnings first.
[2013-05-20 17:30:52 - danielinbiti] at proguard.Initializer.execute(Initializer.java:321)
[2013-05-20 17:30:52 - danielinbiti] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-05-20 17:30:52 - danielinbiti] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-05-20 17:30:52 - danielinbiti] at proguard.ProGuard.main(ProGuard.java:492)


今天,用android4.0在proguard-project.txt中加入
-libraryjars libs/ksoap2-android-assembly-2.6.0-jar-with-dependencies.jar
这句话后,混淆时报上面的错误。
因为项目中用到axis,所以用到了上面的jar。找了找网上资料,有人说加入-ignorewarnings,但这只是打包了,但其实包是用不了的。
于是根据上面错误,自己把ksoap2-android-assembly-2.6.0-jar-with-dependencies.jar中的
org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlSerializer

两个类去掉,混淆通过且能用。
原因:这两个类与android自带的发生了冲突。

相关文章

热门资讯

2020微信伤感网名听哭了 让对方看到心疼的伤感网名大全
2020微信伤感网名听哭了 让对方看到心疼的伤感网名大全 2019-12-26
Intellij idea2020永久破解,亲测可用!!!
Intellij idea2020永久破解,亲测可用!!! 2020-07-29
背刺什么意思 网络词语背刺是什么梗
背刺什么意思 网络词语背刺是什么梗 2020-05-22
苹果12mini价格表官网报价 iPhone12mini全版本价格汇总
苹果12mini价格表官网报价 iPhone12mini全版本价格汇总 2020-11-13
歪歪漫画vip账号共享2020_yy漫画免费账号密码共享
歪歪漫画vip账号共享2020_yy漫画免费账号密码共享 2020-04-07
返回顶部