Lors de l'exportation de mon application Android, Proguard a renvoyé le code d'erreur 1. J'utilise des fichiers jar externes Twitter4j dans mon application.
J'ai déjà ajouté des fichiers jar de bibliothèque, rt.jar (pour cela, j'ai téléchargé le dernier jdk1.7 contenant les classes javax.management. *) Et des instructions dontwarn également dans le fichier proguard.cfg.
J'ai inclus des injars, des déclarations de libraryjars aussi ..
Mis à jour
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-dontshrink
-verbose
#-injars bin/classes
#-injars libs
#-outjars bin/classes-processed.jar
-libraryjars <Java.home>/jre/lib/rt.jar
-libraryjars <Java.home>/lib/tools.jar
-libraryjars /libs/Twitter4j-core-3.0.3.jar
-libraryjars /libs/Twitter4j-media-support-3.0.3.jar
-libraryjars /libs/linkedin-j-Android.jar
-libraryjars /libs/signpost-commonshttp4-1.2.jar
-libraryjars /libs/signpost-core-1.2.1.1.jar
-libraryjars /libs/signpost-jetty6-1.2.1.1.jar
-dontwarn org.Apache.**
-dontwarn org.slf4j.**
-dontwarn org.json.*
-dontwarn org.mortbay.**
-dontwarn org.Apache.log4j.**
-dontwarn org.Apache.commons.logging.**
-dontwarn org.Apache.commons.logging.**
-dontwarn org.Apache.commons.codec.binary.**
-dontwarn javax.xml.**
-dontwarn javax.management.**
-dontwarn Java.lang.management.**
-dontwarn Android.support.**
-dontwarn com.google.code.**
-dontwarn oauth.signpost.**
-dontwarn Twitter4j.**
-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
-keep class javax.** { *; }
-keep class org.** { *; }
-keep class Twitter4j.** { *; }
-keep class Java.lang.management.** { *; }
-keep class com.google.code.** { *; }
-keep class oauth.signpost.** { *; }
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(Android.content.Context, Android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(Android.content.Context, Android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(Java.lang.String);
}
-keep class * implements Android.os.Parcelable {
public static final Android.os.Parcelable$Creator *;
}
Je suis toujours confronté au problème, Proguard est retourné avec le code d'erreur 1.
Mise à jour LogCat:
[2013-02-18 10:43:47 - SP] Proguard returned with error code 1. See console
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter1: can't find superclass or interface javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter2: can't find superclass or interface javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find superclass or interface javax.management.DynamicMBean
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter1: can't find referenced class javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter1: can't find referenced class javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter1: can't find referenced class javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter2: can't find referenced class javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter2: can't find referenced class javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter2: can't find referenced class javax.xml.bind.DatatypeConverter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter2: can't find referenced class javax.xml.bind.DatatypeConverter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter2: can't find referenced class javax.xml.bind.DatatypeConverter
[2013-02-18 10:43:47 - SP] Warning: com.google.code.linkedinapi.schema.Adapter2: can't find referenced class javax.xml.bind.annotation.adapters.XmlAdapter
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.commonshttp.CommonsHttpOAuthProvider: can't find referenced method 'Java.util.Map decodeForm(Java.io.InputStream)' in class oauth.signpost.OAuth
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.commonshttp.CommonsHttpOAuthProvider: can't find referenced method 'void setResponseParameters(Java.util.Map)' in class oauth.signpost.commonshttp.CommonsHttpOAuthProvider
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.io.Buffer
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.Address
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.io.Buffer
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.Address
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.jetty.JettyOAuthConsumer: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.Apache.commons.codec.binary.Base64
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.Apache.commons.codec.binary.Base64
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.Apache.commons.codec.binary.Base64
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.Apache.commons.codec.binary.Base64
[2013-02-18 10:43:47 - SP] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.Apache.commons.codec.binary.Base64
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class Java.lang.management.ManagementFactory
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanServer
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class Java.lang.management.ManagementFactory
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanServer
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanServer
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.CommonsLoggingLoggerFactory: can't find referenced class org.Apache.commons.logging.LogFactory
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.CommonsLoggingLoggerFactory: can't find referenced class org.Apache.commons.logging.LogFactory
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Level
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Level
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLogger: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLoggerFactory: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.Log4JLoggerFactory: can't find referenced class org.Apache.log4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLoggerFactory: can't find referenced class org.slf4j.LoggerFactory
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.internal.logging.SLF4JLoggerFactory: can't find referenced class org.slf4j.LoggerFactory
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenDataException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanAttributeInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanConstructorInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanOperationInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.MBeanNotificationInfo
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.SimpleType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanAttributeInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanParameterInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanConstructorInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.SimpleType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanOperationInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularDataSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularDataSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeDataSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeDataSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularDataSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeNotFoundException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeNotFoundException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.Attribute
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.Attribute
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.ReflectionException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.ReflectionException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.SimpleType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.DynamicMBean
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.MBeanException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.InvalidAttributeValueException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.SimpleType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularType
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenDataException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.MBeanInfo
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanAttributeInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanConstructorInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanOperationInfoSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.MBeanNotificationInfo
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenMBeanParameterInfo
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularDataSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeData
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.OpenDataException
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.TabularDataSupport
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.Attribute
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.Attribute
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] Warning: Twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.AttributeList
[2013-02-18 10:43:47 - SP] You should check if you need to specify additional program jars.
[2013-02-18 10:43:47 - SP] Warning: there were 160 unresolved references to classes or interfaces.
[2013-02-18 10:43:47 - SP] You may need to specify additional library jars (using '-libraryjars').
[2013-02-18 10:43:47 - SP] Warning: there were 2 unresolved references to program class members.
[2013-02-18 10:43:47 - SP] Your input classes appear to be inconsistent.
[2013-02-18 10:43:47 - SP] You may need to recompile them and try again.
[2013-02-18 10:43:47 - SP] Alternatively, you may have to specify the option
[2013-02-18 10:43:47 - SP] '-dontskipnonpubliclibraryclassmembers'.
[2013-02-18 10:43:47 - SP] Java.io.IOException: Please correct the above warnings first.
[2013-02-18 10:43:47 - SP] at proguard.Initializer.execute(Initializer.Java:321)
[2013-02-18 10:43:47 - SP] at proguard.ProGuard.initialize(ProGuard.Java:211)
[2013-02-18 10:43:47 - SP] at proguard.ProGuard.execute(ProGuard.Java:86)
[2013-02-18 10:43:47 - SP] at proguard.ProGuard.main(ProGuard.Java:492)
Merci beaucoup pour tout. Finalement, après tant de difficultés, j'ai trouvé ma folle erreur. J'ai configuré le mauvais fichier de configuration dans project.properties.
Je changeais de code dans proguard.cfg, mais le fichier project.properties contient un chemin de fichier de configuration incorrect, i.e.
proguard.config=${sdk.dir}/tools/proguard/proguard-Android.txt:proguard-project.txt
Corrigé avec ces changements:
proguard.config=${sdk.dir}/tools/proguard/proguard-Android.txt:proguard.cfg
Version de travail de proguard.cfg
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-dontshrink
-verbose
-injars bin/classes
-injars libs
-outjars bin/classes-processed.jar
-libraryjars C:/glassfish3/jdk7/jre/lib/rt.jar
-libraryjars C:/glassfish3/jdk7/lib/tools.jar
-dontwarn org.Apache.**
-dontwarn org.slf4j.**
-dontwarn org.json.*
-dontwarn org.mortbay.**
-dontwarn org.Apache.log4j.**
-dontwarn org.Apache.commons.logging.**
-dontwarn org.Apache.commons.logging.**
-dontwarn org.Apache.commons.codec.binary.**
-dontwarn javax.xml.**
-dontwarn javax.management.**
-dontwarn Java.lang.management.**
-dontwarn Android.support.**
-dontwarn com.google.code.**
-dontwarn oauth.signpost.**
-dontwarn Twitter4j.**
-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
-keep public class com.google.code.linkedinapi.**
-keep class javax.** { *; }
-keep class org.** { *; }
-keep class Twitter4j.** { *; }
-keep class Java.lang.management.** { *; }
-keep class com.google.code.** { *; }
-keep class oauth.signpost.** { *; }
-keepclassmembers public class com.google.code.linkedinapi.client.impl.LinkedInApiXppClient {
public <init>(Java.lang.String, Java.lang.String);
}
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(Android.content.Context, Android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(Android.content.Context, Android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(Java.lang.String);
}
-keep class * implements Android.os.Parcelable {
public static final Android.os.Parcelable$Creator *;
}
Essayez d'ajouter les paquets qui donnent des avertissements, de cette façon:
-dontwarn com.google.code.**
-dontwarn oauth.signpost.**
-dontwarn Twitter4j.**
Pour une raison quelconque, si cela ne fonctionne pas, essayez de faire de même avec les noms de classe et d'interface, comme suit:
-dontwarn javax.management.**
-dontwarn javax.xml.**
-dontwarn org.Apache.**
-dontwarn org.slf4j.**
dans votre fichier de configuration Proguard .
Avec ces options -dontwarn
, vous ne pouvez pas obtenir ces avertissements de votre construction. Vous devez vérifier que vous éditez le fichier de configuration approprié (proguard-project.txt
à partir du SDK Android r20).
J'ai trouvé quelques éléments en intégrant Proguard, cela peut vous être utile.
1> Lors de l'utilisation de la bibliothèque de vérification des licences de Google, nous souhaitons empêcher qu'une classe supplémentaire ne soit masquée dans la bibliothèque supplémentaire. pour cela j'ai utilisé le fichier proguard/config.txt:
**-keep class com.Android.vending.licensing.ILicensingService**
2> Lors de l’utilisation de Google api pour MapActivity, j’ai eu des avertissements:
ne trouve pas les classes référencées pour toutes les classes come.google.Android.maps , et "Remarque: la configuration fait référence à la classe inconnue 'com.google.Android.maps'"
Lorsque nous utilisons les API Google, une bibliothèque supplémentaire est utilisée pour créer le programme. pour cela, nous devons ajuster le chemin.
Normalement, Android.jar se trouve dans votre SDK. mais Google API ajoute une autre bibliothèque, maps.jar, cachée dans Android-add-ons\addon_google_apis_google_inc_8\libs\maps.jar. Nous devons ajouter ceci au fichier build.xml. Recherchez la cible d'optimisation dans build.xml et ajoutez le texte suivant en gras à la commande proguard en modifiant le chemin:
<arg value="-libraryjars ${Android.jar}"/>
<arg value="-libraryjars ${sdk.dir}/add-ons\addon_google_apis_google_inc_8\libs\maps.jar"/>
Regardez cette ref: http://goo.gl/Ifgyj
Essayez d’ajouter la ligne suivante à votre fichier proguard:
-keep public class com.google.code.linkedinapi.**
-keepclassmembers public class com.google.code.linkedinapi.client.impl.LinkedInApiXppClient {
public <init>(Java.lang.String, Java.lang.String);
}
Et aussi ajouter
-keep class Twitter4j.**
-keepclassmembers class Twitter4j.** {
<init>(...);
<methods>;
<fields>;
}
et aussi une bonne idée d'ajouter
-keep public class * extends Android.view.View {
public <init>(Android.content.Context);
public <init>(Android.content.Context, Android.util.AttributeSet);
public <init>(Android.content.Context, Android.util.AttributeSet, int);
public void set*(...);
}
-keepclassmembers class **.R$* {
public static <fields>;
}
Je suppose que Android ne supporte pas jdk 1.7, peut-être que c'est votre problème. Le SDK Android peut-il fonctionner avec JDK 1.7?
Une chose qui a fonctionné pour moi a été de réduire le nombre de tests d’optimisation 2.
Je recevais un message d'erreur "Proguard renvoyé avec le code d'erreur 1. Voir console". Dans mon cas, le problème se trouvait dans le fichier "sdk\tools\proguard\bin\proguard.bat" utilisé par l'outil ADT pour démarrer ProGuard. Il contenait la ligne "Java -jar"% PROGUARD_HOME% "\ lib\proguard.jar% *". Dans mon environnement, la simple commande "Java" ne fonctionne pas. Je ne l'utilise jamais parce que je spécifie des machines virtuelles spécifiques dans des circonstances différentes.
Quoi qu'il en soit, le remplacement de "Java" par le chemin absolu du JDK 1.7 bin\Java.exe a résolu le problème.