gpt4 book ai didi

android - 带有混淆器的 Ksoap2

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:26:38 24 4
gpt4 key购买 nike

我有一个使用 ksoap2 库的应用程序,一切正常,但是当从 Eclipse 导出应用程序时,它显示了这个

Proguard returned with error code 1. See console
Note: there were 4 duplicate class definitions.
Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer
Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.res.ColorStateList depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.AnimationDrawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.ColorDrawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser

浏览完 ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar 我发现它有自己的 org.xmlpull.v1 包和自 API 1 以来,已经在 android.jar 中定义了 4 个文件。

如果这些类已经存在,为什么 ksoap 的作者要添加这些类? O_o 如果他必须做一些更改,那么包名也更改会很好。

无论如何,我可以做两件事来解决这个问题。在 proguard 配置文件中使用 -dontwarn。这似乎不是一个好主意。或者下载源代码并删除该包名称并构建一个 jar。

或者也许还有其他我可以做的事情?

谢谢

最佳答案

我有一个类似的问题,我用这个解决了它:

-ignorewarnings
-keep class org.kobjects.** { *; }
-keep class org.ksoap2.** { *; }
-keep class org.kxml2.** { *; }
-keep class org.xmlpull.** { *; }

关于android - 带有混淆器的 Ksoap2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21109308/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com