繁体   English   中英

Android ant 构建:proguard 在 class ViewConfigurationCompatFroyo 中找不到引用的方法

[英]Android ant build: proguard can't find referenced method in class ViewConfigurationCompatFroyo

我在这里的时间很短,所以我真的希望这里有人知道如何解决这些问题:

[proguard] Warning: android.support.v4.view.ViewConfigurationCompatFroyo: can't find referenced method 'int getScaledPagingTouchSlop()' in class android.view.ViewConfiguration
[proguard] Note: org.codehaus.jackson.map.deser.BasicDeserializerFactory: can't find dynamically referenced class java.util.ConcurrentNavigableMap
[proguard] Note: org.codehaus.jackson.map.deser.BasicDeserializerFactory: can't find dynamically referenced class java.util.ConcurrentSkipListMap
[proguard] Note: there were 2 unresolved dynamic references to classes or interfaces.
[proguard]       You should check if you need to specify additional program jars.
[proguard] Warning: there were 1 unresolved references to program class members.
[proguard]          Your input classes appear to be inconsistent.
[proguard]          You may need to recompile them and try again.
[proguard]          Alternatively, you may have to specify the options
[proguard]          '-dontskipnonpubliclibraryclasses' and/or
[proguard]          '-dontskipnonpubliclibraryclassmembers'.

我已经尝试添加多个东西:

-dontwarn **CompatHoneycomb
-dontwarn **CompatCreatorHoneycombMR2
-keep class android.support.v4.** { *; }

还有(对于 jackson 错误):

-libraryjars /Libraries/Joda/joda-time-1.6.2.jar
-libraryjars /Libraries/stax2-api-3.0.0.jar
-libraryjars /Libraries/jsr311-api-0.8.jar
-libraryjars /Libraries/httpmime-4.0.1.jar

任何人都知道我在 proguard.cfg 中缺少这些参考资料吗? 或者可能有一些关于如何更普遍地调查/解决它的提示?

我将它从 472 个警告减少到这些,主要是通过添加 dontwarn 语句:-dontwarn java.awt。 ,javax.security。 ,java.beans。 ,javax.xml。 ,java.util。 ,org.w3c.dom。

编辑:迁移到答案

-dontwarn **CompatHoneycomb
-dontwarn **CompatCreatorHoneycombMR2
-dontwarn android.support.v4.view.**
-keep class android.support.v4.** { *; }

-dontwarn java.awt.**,javax.security.**,java.beans.**,javax.xml.**,java.util.**,org.w3c.dom.**

编辑我上面的帖子以显示答案。

找到了。

这些似乎有所帮助。

-dontwarn **CompatHoneycomb
-dontwarn **CompatCreatorHoneycombMR2
-dontwarn android.support.v4.view.**
-keep class android.support.v4.** { *; }

-dontwarn java.awt.**,javax.security.**,java.beans.**,javax.xml.**,java.util.**,org.w3c.dom.**

将以下内容添加到您的 proguard 配置文件中。

-keep class org.codehaus.jackson.** { 
    *; 
}

您不需要掩盖 3rd 方库。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM