dx.jar "Игнорирование атрибута InnerClasses для анонимного внутреннего класса" - PullRequest
1 голос
/ 22 мая 2019

Я пытаюсь использовать 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

...