2013-10-15 45 views
3

編輯4: 我試着取出操作欄福爾摩斯和Proguard的做就OK了。所以我想這是與Android支持-v4.jar問題。Proguard的使用Android的操作欄福爾摩斯

包括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/** 

和其他東西,沒有work..Could你給我你的意見,我應該怎麼辦呢?

我使用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) 

編輯

首先,感謝你埃裏克的回答。

我想:

-dotwarn org.apache.common.** 

-dontwarn org.** 

但它顯示了完全相同的控制檯錯誤。

我看到了這個thread,所以我嘗試添加一個新的類路徑變量與sdk的路徑,但它顯示相同的控制檯錯誤。

這是我的項目。屬性文件它是指太操作欄福爾摩斯

# 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:

因爲它說,在行動福爾摩斯酒吧website我想這也不會在所有錯誤控制檯改變:

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

-keepattributes *Annotation* 

EDIT 3:

我試圖從項目中脫去外部罐(不是ABS這是一個庫),但它仍然顯示完全相同的錯誤。我沒有得到它來自哪裏。

+0

[這裏] [1]什麼解決類似porblem! [1]:http://stackoverflow.com/questions/19414823/export-signed-android-apk-with-proguard – zzy

+0

@eyyo夥計,你得到了這個問題的解決方法?如果是這樣,你能和我分享一下,以便它可以幫助我解決我面臨的類似問題嗎?問候。 –

+0

@HareshChaudhary我無法解決它..其實我現在還沒有在Android上工作。如果您找到解決方案,請回答問題,以便我們可以給它一個快樂的結局。 :D祝你好運! – eyyo

回答

1

我已經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.** 

希望這有助於解決您的問題。

7

org.apache.commons.logging.LogFactory一些類是從你的庫丟失。顯然,你的應用程序不會使用它們,所以你可以告訴ProGuard它沒關係。例如:

-dontwarn org.apache.commons.** 

請參閱ProGuard手冊>故障排除>Warning: can't find referenced class

其他類,如org.apache.http.**已經出現在Android運行。您不應該在應用程序庫中複製它們,因爲無論如何,Android運行時的版本都會優先。

見的ProGuard手冊>故障排除>Warning: library class ... depends on program class ...

最後,你不應該指定配置文件-injars-libraryjars選項。螞蟻/ Eclipse中/搖籃建設過程中就已經自動指定所有必要的-injars-outjars,並且-libraryjars你,根據你的項目的內容。

見的ProGuard手冊>>Note: duplicate definition of program/library class

+0

謝謝你的答案,我試過,但沒有奏效,因爲它顯示了相同的控制檯錯誤。我將我的project.properties添加到問題中。 Regards – eyyo

+0

Lafortune先生,謝謝你的時間。我知道你是負責Proguard項目的,所以對我而言,直接與你談話讓我很榮幸。我試過你的解決方案,但它沒有幫助,實際上我沒有改變控制檯錯誤。沒有ActionBarSherlock的同一個項目使用Proguard導出罰款。我嘗試了很多東西(我的問題顯示他們),但沒有任何工作。你能給我一個線索或我可以嘗試的東西嗎?非常感謝你。 – eyyo

相關問題