0

我在我的android项目中使用restfb库,一切都很好。当我尝试使用它运行 proguard 时,它已成功完成,但是在运行应用程序时,我得到了

com.restfb.exception.FacebookJsonMappingException:您必须指定要映射到的 Java 类型。在 com.restfb.DefaultJsonMapper.toJavaList(未知来源)

我的 proguard-project.txt 包含这些行

-keep class com.restfb.** { *; }
-keep interface com.restfb.** { *; }

我错过了什么吗?

4

1 回答 1

0

JSON 映射器可能使用自省来查找泛型类型信息。ProGuard 的混淆步骤默认将其移除,因为虚拟机不需要它,但您可以保留它:

-keepattributes Signature
于 2013-04-18T00:00:35.283 回答