当前位置 : 主页 > 手机开发 > android >

Proguard Android使用Action Bar Sherlock

来源:互联网 收集:自由互联 发布时间:2021-06-11
编辑4: 我试过拿出Action Bar Sherlock,Proguard也没关系.所以我猜这是 android-support-v4.jar的一个问题. 我在尝试包含ABS库时尝试了这个,但它没有用. -keep class android.support.v4.app.** { *; }-keep inter
编辑4:
我试过拿出Action Bar Sherlock,Proguard也没关系.所以我猜这是 android-support-v4.jar的一个问题.

我在尝试包含ABS库时尝试了这个,但它没有用.

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

-keepattributes *Annotation*

最后,奇怪的是,我尝试没有ABS库,没有proguard-android.txt,它也运行良好.

我不知道问题是什么.

我已经阅读了大量有关此问题的Q / A并尝试了许多解决方案,但都没有解决.

我试过做:

-injars libs/**

和:

-libraryjars  libs/**

还有其他不起作用的东西.你能告诉我你应该怎么做的意见吗?

我正在使用4个外部罐子:

> apache-mime4j-0.6.jar
> httpclient-4.2.2.jar
> httpcore-4.2.2.jar
> httpmime-4.2.2.jar

当我尝试导出签名的apk时,这是错误控制台:

[2013-10-15 18:36:12 - ExampleProGuard] Proguard returned with error code 1. See console
[2013-10-15 18:36:12 - ExampleProGuard] Note: there were 364 duplicate class definitions.
[2013-10-15 18:36:12 - ExampleProGuard] Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestAddCookies: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestAddCookies: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestAuthCache: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestAuthCache: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestAuthenticationBase: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestAuthenticationBase: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestClientConnControl: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.RequestClientConnControl: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.ResponseAuthCache: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.ResponseAuthCache: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.ResponseProcessCookies: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.client.protocol.ResponseProcessCookies: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.BasicScheme: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.BasicScheme: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NTLMEngineImpl$NTLMMessage: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NTLMEngineImpl$NTLMMessage: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NTLMEngineImpl$NTLMMessage: can't find referenced class org.apache.commons.codec.binary.Base64
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.Oid
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AbstractAuthenticationHandler: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AbstractAuthenticationHandler: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AbstractHttpClient: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AbstractHttpClient: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AuthenticationStrategyAdaptor: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AuthenticationStrategyAdaptor: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AuthenticationStrategyImpl: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AuthenticationStrategyImpl: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AutoRetryHttpClient: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.AutoRetryHttpClient: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.DefaultRedirectHandler: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.DefaultRedirectHandler: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.DefaultRedirectStrategy: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.DefaultRedirectStrategy: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.DefaultRequestDirector: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.DefaultRequestDirector: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.HttpAuthenticator: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.client.HttpAuthenticator: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.BasicClientConnectionManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.BasicClientConnectionManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultClientConnection: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultClientConnection: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultClientConnection: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultClientConnectionOperator: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultClientConnectionOperator: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultHttpResponseParser: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultHttpResponseParser: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultResponseParser: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.DefaultResponseParser: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.IdleConnectionHandler: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.IdleConnectionHandler: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.InMemoryDnsResolver: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.InMemoryDnsResolver: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.PoolingClientConnectionManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.PoolingClientConnectionManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.SingleClientConnManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.SingleClientConnManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.AbstractConnPool: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.AbstractConnPool: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.ConnPoolByRoute: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.ConnPoolByRoute: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.RouteSpecificPool: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.codec.Base64InputStream: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.codec.Base64InputStream: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.codec.DecoderUtil: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.codec.DecoderUtil: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.codec.QuotedPrintableInputStream: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.codec.QuotedPrintableInputStream: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.descriptor.DefaultBodyDescriptor: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.descriptor.DefaultBodyDescriptor: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.AddressListField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.AddressListField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.ContentDispositionField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.ContentDispositionField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.ContentTypeField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.ContentTypeField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.DateTimeField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.DateTimeField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.MailboxField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.MailboxField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.MailboxListField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.field.MailboxListField: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.message.BodyFactory: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.message.BodyFactory: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.parser.AbstractEntity: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.parser.AbstractEntity: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.storage.DefaultStorageProvider: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.storage.DefaultStorageProvider: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.util.CharsetUtil: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.util.CharsetUtil: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.util.MimeUtil: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard] Warning: org.apache.james.mime4j.util.MimeUtil: can't find referenced class org.apache.commons.logging.LogFactory
[2013-10-15 18:36:12 - ExampleProGuard]       You should check if you need to specify additional program jars.
[2013-10-15 18:36:12 - ExampleProGuard] Warning: there were 134 unresolved references to classes or interfaces.
[2013-10-15 18:36:12 - ExampleProGuard]          You may need to specify additional library jars (using '-libraryjars').
[2013-10-15 18:36:12 - ExampleProGuard] Warning: there were 1 instances of library classes depending on program classes.
[2013-10-15 18:36:12 - ExampleProGuard]          You must avoid such dependencies, since the program classes will
[2013-10-15 18:36:12 - ExampleProGuard]          be processed, while the library classes will remain unchanged.
[2013-10-15 18:36:12 - ExampleProGuard] java.io.IOException: Please correct the above warnings first.
[2013-10-15 18:36:12 - ExampleProGuard]     at proguard.Initializer.execute(Initializer.java:321)
[2013-10-15 18:36:12 - ExampleProGuard]     at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-10-15 18:36:12 - ExampleProGuard]     at proguard.ProGuard.execute(ProGuard.java:86)
[2013-10-15 18:36:12 - ExampleProGuard]     at proguard.ProGuard.main(ProGuard.java:492)

编辑

首先,谢谢Eric的回答.

我试过了:

-dotwarn org.apache.common.**

-dontwarn org.**

但它显示完全相同的控制台错误.

我看到这个thread,所以我尝试添加一个新的classpath变量和sdk的路径,但它显示了相同的控制台错误.

这是我的project.properties文件,它也引用了Action Bar Sherlock

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-15
android.library=false
android.library.reference.1=../JakeWharton-ActionBarSherlock-5b15c92/actionbarsherlock

编辑2:

正如它在Action Sherlock Bar website上所说的那样我也尝试了这一点而不改变所有的错误控制台:

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

-keepattributes *Annotation*

编辑3:

我尝试从项目中取出外部罐子(不是ABS,这是一个库),但它仍然显示完全相同的错误.我不知道它来自哪里.

我在 here之前已经回答了这个问题,我也把它放在这里以便它可以帮助某人.

我遇到了同样的问题并在某个地方阅读了解决此问题的方法,它是禁用minifyEnabled,生成签名的APK.

buildTypes {
    release {
        minifyEnabled false
        shrinkResources true
        proguardFiles 'proguard-project.txt'
    }

在将buildTool更新到23.0之前,我从未遇到过这个问题.

此外,对于这个较新的版本,您需要将其添加到Progaurd.txt文件中.

-keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**

希望这也有助于解决您的问题.

网友评论