ProGuard的错误无法找到父类或接口org.apache.http.entity [英] ProGuard error can't find superclass or interface org.apache.http.entity

查看:114
本文介绍了ProGuard的错误无法找到父类或接口org.apache.http.entity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是得到使用ProGuard以下错误:

I get always with ProGuard following error:

[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文件是:

My proguard.cfg file is:

-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

我已经加了我所有的外部库,为什么我会收到总是这些错误? 任何人都可以帮忙吗?

I've already added all my external libs so why am I getting always these errors? Can anybody help?

修改21.05.2012: 问题是,如果添加Dropbox的JAR和ActionBarSherlock。 如果我只添加Dropbox的,我没有问题。 如果我只添加ActionBarSherlock,我没有问题。 但如果我说这两个,我会得到上面的错误。

EDIT 21.05.2012: The problem is if you add "Dropbox" jar AND "ActionBarSherlock". If I add only "Dropbox", I have no problem. If I add only "ActionBarSherlock", I have no problem. But if I added both, I would get the errors above.

推荐答案

如果您已经添加ActionBarSherlock和DropBox的罐子到项目中存在的问题。 为了解决这个问题,下面的行添加到您的ProGuard-project.txt文件:

The problem exists if you have added "ActionBarSherlock" and "DropBox" jars to your project. To solve the problem, add the below line to your proguard-project.txt file:

-dontwarn org.apache.**

该警告会被忽略,它会工作,因为每一个单独的jar文件的工作。 所以我认为,这将是ProGuard的错误,如果都被添加。

The warning will be ignored and it will work because each of the jars alone are working. So I think, this will be the bug in ProGuard, if both are added.

这篇关于ProGuard的错误无法找到父类或接口org.apache.http.entity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆