gpt4 book ai didi

android - 忽略匿名内部类 org.apache 的 InnerClasses 属性

转载 作者:行者123 更新时间:2023-11-30 00:57:11 25 4
gpt4 key购买 nike

伙计们。我收到这些错误(其中 504 个):

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$7) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.

我把它放在 proguard 中

-keepattributes InnerClasses, EnclosingMethod
-dontoptimize

但是,我仍然遇到这个错误。我用

useLibrary 'org.apache.http.legacy'
dependencies {
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
}

一切正常,这些错误仅在我生成 apk 时出现。但 APK 工作正常。我怎样才能摆脱这些错误?

最佳答案

将以下属性添加到 pro-guard 文件中

-dontwarn org.apache.**
-keep class org.apache.http.** { *; }

关于android - 忽略匿名内部类 org.apache 的 InnerClasses 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39942173/

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