Android ProGuard与org.xmlpull.v1.XmlPullParser错误

前端之家收集整理的这篇文章主要介绍了Android ProGuard与org.xmlpull.v1.XmlPullParser错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我的应用程序使用ProGuard构建时,它会失败并显示以下消息.
我使用 Android SDK与一些-libraryjars生成的默认proguard.cfg.
我该怎么办?
[2011-03-17 09:27:04 - MyProject] Proguard returned with error code 1. See console
[2011-03-17 09:27:04 - MyProject] Note: there were 4247 duplicate class definitions.
[2011-03-17 09:27:04 - MyProject] Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.AnimationDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject]       You should check if you need to specify additional program jars.
[2011-03-17 09:27:04 - MyProject] Warning: there were 9 instances of library classes depending on program classes.
[2011-03-17 09:27:04 - MyProject]          You must avoid such dependencies,since the program classes will
[2011-03-17 09:27:04 - MyProject]          be processed,while the library classes will remain unchanged.
[2011-03-17 09:27:04 - MyProject] java.io.IOException: Please correct the above warnings first.
[2011-03-17 09:27:04 - MyProject]   at proguard.Initializer.execute(Initializer.java:321)
[2011-03-17 09:27:04 - MyProject]   at proguard.ProGuard.initialize(ProGuard.java:211)
[2011-03-17 09:27:04 - MyProject]   at proguard.ProGuard.execute(ProGuard.java:86)
[2011-03-17 09:27:04 - MyProject]   at proguard.ProGuard.main(ProGuard.java:492)

显然,org.xmlpull.v1.XmlPullParser不是程序类.
我已将ProGuard更新到最新版本(4.6),但具有相同的警告.

解决方法

将此行添加到proguard-project.txt
-dontwarn org.xmlpull.v1.**

并且这行到project.properties

proguard.config=proguard-project.txt
原文链接:https://www.f2er.com/android/310938.html

猜你在找的Android相关文章