我正在尝试使用dx.Jar
andorid的工具将其编译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),还使用了-- optimize
, no-strict
,keep-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 中是否有任何类似的选项