Android ProGuard错误可以';找不到超类或接口org.apache.http.entity

Android ProGuard错误可以';找不到超类或接口org.apache.http.entity,android,proguard,Android,Proguard,我始终使用ProGuard获得以下错误: [2012-05-19 17:50:13 - xxx] Warning: there were 13 unresolved references to program class members. [2012-05-19 17:50:13 - xxx] Your input classes appear to be inconsistent. [2012-05-19 17:50:13 - xxx] Y

我始终使用ProGuard获得以下错误:

[2012-05-19 17:50:13 - xxx] Warning: there were 13 unresolved references to      program class members.
[2012-05-19 17:50:13 - xxx]          Your input classes appear to be     inconsistent.
[2012-05-19 17:50:13 - xxx]          You may need to recompile them and try again.
[2012-05-19 17:50:13 - xxx]          Alternatively, you may have to specify the option 
[2012-05-19 17:50:13 - xxx]          '-dontskipnonpubliclibraryclassmembers'.
[2012-05-19 17:50:13 - xxx] Error: Please correct the above warnings first.
[2012-05-19 17:55:40 - xxx] Proguard returned with error code 1. See console
[2012-05-19 17:55:40 - xxx] Note: there were 239 duplicate class definitions.
[2012-05-19 17:55:40 - xxx] Warning: org.apache.http.entity.mime.FormBodyPart:    can't find superclass or interface org.apache.james.mime4j.message.BodyPart
[2012-05-19 17:55:40 - xxx] Warning: org.apache.http.entity.mime.HttpMultipart: can't find superclass or interface org.apache.james.mime4j.message.Multipart
[2012-05-19 17:55:40 - xxx] Warning: org.apache.http.entity.mime.MinimalField: can't find superclass or interface org.apache.james.mime4j.parser.Field
我的proguard.cfg文件是:

-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }

-keepattributes *Annotation*
-keepattributes SourceFile, LineNumberTable

-libraryjars /libs/crittercism_v2_0_1.jar
-libraryjars /libs/dropbox-android-sdk-1.2.2.jar
-libraryjars /libs/FlurryAgent.jar
-libraryjars /libs/httpmime-4.0.3.jar
-libraryjars /libs/json_simple-1.1.jar
我已经添加了所有的外部lib,为什么总是出现这些错误? 有人能帮忙吗

编辑2012年5月21日: 问题是如果您添加了“Dropbox”jar和“ActionBarSherlock”。 如果我只添加“Dropbox”,我没有问题。 如果我只添加“ActionBarSherlock”,我没有问题。 但是如果我同时添加了这两个选项,我会得到上面的错误。

您可能需要:

-保持类org.apache.http**

-保留接口org.apache.http**


这当然是假设ProGuard正在抱怨apache类。诚然,我在猜测,因为我不是ProGuard方面的专家。

如果您在项目中添加了“ActionBarSherlock”和“DropBox”jar,那么问题就存在了。 要解决此问题,请在proguard-project.txt文件中添加以下行:

-dontwarn org.apache.**
警告将被忽略,它将工作,因为每个罐子都单独工作。
因此,我认为,如果两者都添加,这将是ProGuard中的错误。

是的,我认为这是一个解决方案,但我不想保留它,因为我不使用它。还有我添加到libraryjars的所有外部罐子!那么为什么我会犯这个错误呢?你可能没有选择的余地。查看ProGuard示例页面是否有帮助?这并不能解决问题-使用上面的@chrisonline。我的答案可能确实不正确,但关闭警告也不是一个好主意,我相信你只是在隐藏问题。需要对该问题进行进一步调查以了解它。它不起作用,错误是:警告:a.a$a:在程序类a.a中找不到引用字段“org.apache.http.HttpEntity wrappedEntity”$a@Kenji:对不起,我不再使用ActionBarSherlock了,所以我帮不了你。@BinilS:你这是什么意思“API不会使用org.apache调用”?