Export signed Android apk with Proguard

2019-05-15 12:26发布

What I am trying to do:

obfuscate and export a signed app from Eclipse.

The problem:

I am getting the same console error, no matter what I write on Project.properties and on proguard-android.txt. it makes me have no clue of what´s going on and I´m starting to feel miserable.

What I could do:

  • I could export the project without using Proguard.
  • I could export a similar project that didn't use ABS (Action Bar Sherlock) using Proguard

My questions:

  • Is it possible that eclipse is not using at all proguard-android.txt?
  • When you include ABS library you should delete android-support-v4.jar from your project because the project will use the library's one. I did what ABS site advice but still doesn't work. Am I missing something?

The code:

Project.properties:

    # 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-5a15d92/actionbarsherlock

proguard.android.txt:

# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose

-dontwarn org.apache.commons.**


# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
-dontoptimize
-dontpreverify
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.

-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService

# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
    native <methods>;
}

# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
   void set*(***);
   *** get*();
}

# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class **.R$* {
    public static <fields>;
}


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

-keepattributes *Annotation*


# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version.  We know about them, and they are safe.
-dontwarn android.support.**

Console error: (it is always the same no matter what I changed on prguard.android.txt)

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

Finally, I've tried these without success:

1) - Under the Project menu

  • Uncheck Build automatically

  • Then Project > Clean...

  • On this window, uncheck Start build immediately

  • Choose Clean all projects and click OK

  • Select your Sherlock ActionBar project

  • Do Project > Build project (NOT Build All).

  • This will build ONLY this one library

  • Do this for any library projects you have included.

  • Click Now, export your project as a signed APK.

2)

-dontwarn org.apache.commons.**
-dontwarn org.apache.**

This question is related with this one but it got too confusing so I made it up.

Thank you for reading. Redards

0条回答
登录 后发表回答