Android Proguard:如何解决错误代码1?

Android Proguard:如何解决错误代码1?,android,proguard,Android,Proguard,我在project.properties中取消了以下行的注释: proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 并用最新版本的Proguard(5.0)取代了android sdk的libs。 当我尝试导出apk时,我看到以下错误: Proguard returned with error code 1. See console Proguard Error 1 Outpu

我在
project.properties
中取消了以下行的注释:

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
并用最新版本的Proguard(5.0)取代了android sdk的libs。 当我尝试导出apk时,我看到以下错误:

Proguard returned with error code 1. See console
Proguard Error 1 
Output: 
Note: there were 365 duplicate class definitions. 
      (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass) 
Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find superclass or interface javax.servlet.ServletContextListener 
Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger 
Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger 
Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextListener 
Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent 
Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent 
Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent 
Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext 
Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.Oid 
Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.GSSException 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element 
Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClient 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClient 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASResponse 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASResponse 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASResponse 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException 
Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue 
Warning: there were 153 unresolved references to classes or interfaces. 
         You may need to add missing library jars or update their versions. 
         If your code works fine without the missing classes, you can suppress 
         the warnings with '-dontwarn' options. 
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) 
Warning: there were 1 instances of library classes depending on program classes. 
         You must avoid such dependencies, since the program classes will 
         be processed, while the library classes will remain unchanged. 
         (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency) 
java.io.IOException: Please correct the above warnings first. 
    at proguard.Initializer.execute(Initializer.java:473) 
    at proguard.ProGuard.initialize(ProGuard.java:222) 
    at proguard.ProGuard.execute(ProGuard.java:97) 
    at proguard.ProGuard.main(ProGuard.java:507)

如何解决?我的proguard-project.txt是空的(很多行前面有#行)。感谢您提前发布广告。

从日志本身可以看到解决方案

如果您的代码在没有缺少类的情况下运行良好,则可以抑制 带有“-dontwarn”选项的警告。

尝试添加

-dontwarn org.apache.*

类似地,在proguard文件中添加其他包