Xamarin.Android JARTOXML 缺失 class 反射时出现错误 'ClassName' :期望在分支目标 18 处有堆栈映射帧

Xamarin.Android JARTOXML missing class error was raised while reflecting 'ClassName' : Expecting a stackmap frame at branch target 18

原始aar lib使用API level 24编译并使用最新的proguard 5.3.1混淆。此库已添加到 xamarin.android 绑定库项目。 Xamarin 在首选项 jdk1.8.0_91.

中以 JDK8 为目标

结果是在构建时出现大量警告,如下所示:

"missing class error was raised while reflecting "CLASS" : Expecting a stackmap frame at branch target 18"

因此,没有为该 类 生成代码。 知道可以做什么吗?

感谢任何帮助

P.S。没有混淆绑定生成按预期工作。

Jar2Xml 有一些基于使用的 JDK 的特定行为:

JDK 1.7 将跳过它认为混淆的类型。因此,您不会收到任何解析器错误。

JDK 然而 1.8 将抛出这些解析器错误,但仅针对不会绑定的类型。

尝试通过以下方式对您的库进行去混淆处理:

https://gist.github.com/JonDouglas/dda6d8ace7d071b0e8cb#missing-types--obfuscated-types

注意:您是否尝试过 class-parse 而不是 Jar2Xml?

https://gist.github.com/JonDouglas/dda6d8ace7d071b0e8cb#pick-your-tooling

最近class-parse解决了这个问题

https://github.com/xamarin/java.interop/pull/92