返回顶部
首页 > 资讯 > 移动开发 >android4.0混淆XmlPullParser报错原因分析解决
  • 824
分享到

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

Android 2022-06-06 10:06:40 824人浏览 薄情痞子
摘要

代码如下: [2013-05-20 17:30:52 - danielinbiti] Proguard returned with error code 1. See con

代码如下:
[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自带的发生了冲突。 您可能感兴趣的文章:详解Android的反编译和代码混淆Android 实现代码混淆的实例Android studio 混淆+打包+验证是否成功AndroidApk混淆编译时,报告java.io.IOException...错误解决办法Android studio利用gradle打jar包并混淆的方法详解Android Studio多渠道批量打包及代码混淆Android 混淆代码详解及实例android app进行代码混淆实例详解Android实用图文教程之代码混淆、第三方平台加固加密、渠道分发Android应用开发之代码混淆ANDROID应用程序的混淆打包分享proguar在Android混淆中的用法


--结束END--

本文标题: android4.0混淆XmlPullParser报错原因分析解决

本文链接: https://lsjlt.com/news/27609.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作