0

这是控制台输出:

            [2012-11-27 21:37:04 - com.generalquiz.SplashActivity] Proguard returned with error code 1. See console
            [2012-11-27 21:37:04 - com.generalquiz.SplashActivity] 
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Proguard returned with error code 1. See console
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find superclass or interface com.paypal.android.MEP.PayPalResultDelegate
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt.datatransfer.Transferable
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.datatransfer.NativeClipboard: can't find superclass or interface java.awt.datatransfer.Clipboard
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController$1: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController$1: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.Sasl
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity]  at proguard.Initializer.execute(Initializer.java:321)
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity]  at proguard.ProGuard.initialize(ProGuard.java:211)
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity]  at proguard.ProGuard.execute(ProGuard.java:86)
            [2012-11-27 21:40:45 - com.generalquiz.SplashActivity]  at proguard.ProGuard.main(ProGuard.java:492)
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Proguard returned with error code 1. See console
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find superclass or interface com.paypal.android.MEP.PayPalResultDelegate
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt.datatransfer.Transferable
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.datatransfer.NativeClipboard: can't find superclass or interface java.awt.datatransfer.Clipboard
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.fortumo.FortumoPaymentProvider$1: can't find referenced class com.fortumo.android.Fortumo
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.fortumo.FortumoPaymentProvider$1: can't find referenced class com.fortumo.android.Fortumo
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.fortumo.FortumoPaymentProviderController: can't find referenced class com.fortumo.android.FortumoActivity
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalResultDelegate
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController: can't find referenced class com.paypal.android.MEP.PayPalPayment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController$1: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController$1: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController$1: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.scoreloop.client.android.core.paymentprovider.paypalx.PayPalXPaymentProviderController$1: can't find referenced class com.paypal.android.MEP.PayPal
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.Sasl
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.Sasl
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslException
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslException
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.auth.callback.NameCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.auth.callback.NameCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.auth.callback.NameCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity]       You should check if you need to specify additional program jars.
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] Warning: there were 268 unresolved references to classes or interfaces.
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity]          You may need to specify additional library jars (using '-libraryjars').
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity] java.io.IOException: Please correct the above warnings first.
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity]  at proguard.Initializer.execute(Initializer.java:321)
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity]  at proguard.ProGuard.initialize(ProGuard.java:211)
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity]  at proguard.ProGuard.execute(ProGuard.java:86)
            [2012-11-27 21:44:45 - com.generalquiz.SplashActivity]  at proguard.ProGuard.main(ProGuard.java:492)

还有我的 proguard.cfg :

            -optimizationpasses 5
            -dontusemixedcaseclassnames
            -dontskipnonpubliclibraryclasses
            -dontpreverify
            -verbose
            -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

            -keep public class * extends android.app.Activity
            -keep public class * extends android.app.Application
            -keep public class * extends android.app.Service
            -keep public class * extends android.content.BroadcastReceiver
            -keep public class * extends android.content.ContentProvider
            -keep public class * extends android.app.backup.BackupAgentHelper
            -keep public class * extends android.preference.Preference
            -keep public class com.android.vending.licensing.ILicensingService

            -keepclasseswithmembernames class * {
                native <methods>;
            }

            -keepclasseswithmembers class * {
                public <init>(android.content.Context, android.util.AttributeSet);
            }

            -keepclasseswithmembers class * {
                public <init>(android.content.Context, android.util.AttributeSet, int);
            }

            -keepclassmembers class * extends android.app.Activity {
               public void *(android.view.View);
            }

            -keepclassmembers enum * {
                public static **[] values();
                public static ** valueOf(java.lang.String);
            }

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

            -keep class com.scoreloop.client.android.core.** { *; }
            -keep class com.facebook.android.** { *; }

我搜索了proguard,但我不清楚如何解决这个问题。我应该在 proguard.cfg 中写什么,如果我忽略任何类意味着它不会混淆代码?

4

2 回答 2

1

您可以在配置中添加:

-dontwarn com.sun.mail.imap.protocol.**
-dontwarn com.scoreloop.client.android.core.paymentprovider.paypalx.**
...
于 2012-11-27T20:24:24.713 回答
0

要完全禁用混淆,请添加

-dontobfuscate

如果您更喜欢混淆,我认为您需要使用 -keep 标记它在运行时找不到的类

这是我过去使用过的一个很好的资源:http: //proguard.sourceforge.net/index.html#/manual/optimizations.html

于 2012-11-28T13:23:52.730 回答