dx.jar“忽略匿名内部类的InnerClasses属性”

时间:2019-05-22 07:41:33

标签: android dx

我正在尝试使用andorid的dx.Jar工具将wechat-SDKandroid-with-mta-5.1.6.Jar编译为dex文件并将其放入我的项目中。

但是我遇到了以下警告:

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

我尝试了dx.jar工具的多个版本(1.16,1.7),还使用了-- optimizeno-strictkeep-classes命令

java -jar dx.jar --dex --output=\JavaTempPath\classes.dex \wechat-sdk-android-with-mta-5.1.6.jar

java -jar dx.jar --dex --no-optimize --no-strict --keep-classes --output=\JavaTempPath\classes.dex \wechat-sdk-android-with-mta-5.1.6.jar

请注意,我没有使用android studio工具进行打包,而是直接使用dx.jar工具,因此无法将-keepattributes EnclosingMethod之类的指令添加到proguard文件中进行排序出来,我要问的是dx.jar中有任何类似的选项

0 个答案:

没有答案