我正在使用ksoap2版本2.4连接.net webservice并获取数据。我在导出应用程序时正在使用ProGuard。 我在使用proguard导出时遇到了这个错误。当我不使用它时没有问题。
[2016-04-13 11:41:39 - Agency] Proguard returned with error code 1. See console
[2016-04-13 11:41:39 - Agency] Note: there were 4 duplicate class definitions.
[2016-04-13 11:41:39 - Agency] Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer
[2016-04-13 11:41:39 - Agency] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.content.res.ColorStateList depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.ColorDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.GradientDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.InsetDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.ShapeDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.graphics.drawable.ShapeDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2016-04-13 11:41:39 - Agency] You should check if you need to specify additional program jars.
[2016-04-13 11:41:39 - Agency] Warning: there were 16 instances of library classes depending on program classes.
[2016-04-13 11:41:39 - Agency] You must avoid such dependencies, since the program classes will
[2016-04-13 11:41:39 - Agency] be processed, while the library classes will remain unchanged.
[2016-04-13 11:41:39 - Agency] java.io.IOException: Please correct the above warnings first.
[2016-04-13 11:41:39 - Agency] at proguard.Initializer.execute(Initializer.java:321)
[2016-04-13 11:41:39 - Agency] at proguard.ProGuard.initialize(ProGuard.java:211)
[2016-04-13 11:41:39 - Agency] at proguard.ProGuard.execute(ProGuard.java:86)
[2016-04-13 11:41:39 - Agency] at proguard.ProGuard.main(ProGuard.java:492)
我搜索了google并找到了一些解决方案。但是没有一个能够解决问题。
通过使用-dontwarn
我的应用程序关闭。使用-keep class
我得到了同样的错误。
我正在使用eclipse。
我该怎么做?
答案 0 :(得分:0)
如错误所示,您有多个类。
我认为你有多个相同库的jar文件,可能是同一个库的不同版本。
因此请仔细检查您的库并删除任何副本(如果有),然后Clean>Restart>Rebuild
APK
。