web-dev-qa-db-ja.com

外部jarでエラーを保護する-エラーコード1を返します

Androidアプリケーションをエクスポートしているときに、Proguardがエラーコード1で返されました。アプリでTwitter4j外部jarを使用しています。

ライブラリjar、rt.jar(このために、javax.management。*クラスを持つ最新のjdk1.7をダウンロードしました)およびdontwarnステートメントもproguard.cfgファイルに追加しました。

Injars、libraryjarsステートメントも含めました。

更新

-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 *;
}

それでも私は問題に直面しています、Proguardはエラーコード1で返されました。

更新 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)
18
Santhosh

どうもありがとうございました。とうとう苦労した後、私は自分の愚かな間違いを見つけました。 project.propertiesで間違った構成ファイルを構成しました。

Proguard.cfgのコードを変更していましたが、project.propertiesファイルに間違った構成ファイルパスが含まれています。

proguard.config=${sdk.dir}/tools/proguard/proguard-Android.txt:proguard-project.txt

この変更で修正されました:

proguard.config=${sdk.dir}/tools/proguard/proguard-Android.txt:proguard.cfg

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 *;
}
10
Santhosh

次のように、警告を表示するパッケージを追加してみてください。

-dontwarn com.google.code.**
-dontwarn oauth.signpost.**
-dontwarn Twitter4j.**

何らかの理由でこれが機能しない場合は、次のようにクラス名とインターフェイス名で同じことを試してください。

-dontwarn javax.management.**
-dontwarn javax.xml.**
-dontwarn org.Apache.**
-dontwarn org.slf4j.**

Proguard構成ファイルに。

15
Archie.bpgc

これらを考えると-dontwarnオプション、ビルドからこれらの警告を受け取ることはできません。適切な構成ファイルを編集していることを再確認する必要があります(proguard-project.txt Android SDK r20)現在。

3
Eric Lafortune

Proguardを統合しているときに、いくつかのことがわかりました。おそらくそれはあなたにとって役立つでしょう。

1> Googleのライセンス検証ライブラリを使用している間、追加のクラスが追加のライブラリで難読化されないようにします。そのために私はproguard/config.txtファイルを使用しました:

**-keep class com.Android.vending.licensing.ILicensingService**

2> MapActivityにGoogleAPIを使用しているときに、警告が表示されました。

すべてのcome.google.Android.mapsクラスの参照クラスが見つかりません。「注:構成は不明なクラス 'com.google.Android.maps'を参照しています」」

Google APIを使用する場合、プログラムのビルドに使用される追加のライブラリがあります。そのためには、パスを調整する必要があります。

通常、SDKにはAndroid.jarだけがあります。ただし、Google APIは、Android-sdk-windows\add-ons\addon_google_apis_google_inc_8\libs\maps.jarに隠された別のライブラリmaps.jarを追加します。これをbuild.xmlファイルに追加する必要があります。 build.xmlで最適化ターゲットを見つけ、パスを調整して、太字の次のテキストをproguardコマンドに追加します。

<arg value="-libraryjars ${Android.jar}"/>
<arg value="-libraryjars ${sdk.dir}/add-ons\addon_google_apis_google_inc_8\libs\maps.jar"/>

この参照を見てください: http://goo.gl/Ifgyj

3>参照: Android Proguardは外部jarをスキップします

1
LOG_TAG

次の行を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);
   }

また、追加します

-keep class Twitter4j.**
-keepclassmembers class Twitter4j.** {
    <init>(...);
    <methods>;
    <fields>;
}

また、追加することをお勧めします

-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>;
}
1
Wiebe Elsinga

Androidはjdk1.7をサポートしていません。それが問題かもしれません。 Android SDKはJDK1.7で動作しますか?

0
M-WaJeEh

私のために働いた1つのことは、「最適化パス」の試行2を減らすことでした。

0
Raanan

「Proguardがエラーコード1で返されました。コンソールを参照してください」というエラーが表示されていました。私の場合、問題はADTがProGuardを起動するために使用する「sdk\tools\proguard\bin\proguard.bat」ファイルにありました。 「Java-jar」%PROGUARD_HOME% "\ lib\proguard.jar%*"という行が含まれていました。私の環境では、単純なコマンド「Java」は機能しません。さまざまな状況で特定のJVMを指定するため、これを使用することはありません。

とにかく、「Java」をJDK 1.7 bin\Java.exeの絶対パスに変更すると問題が解決しました。

0
Svet