android - 创建版本 android apk 时出现 Proguard 异常

标签 android macos apk proguard gae-eclipse-plugin

我正在使用 eclipse 插件构建一个应用引擎连接的 android 项目。该项目运行良好,因此我决定是时候创建一个发布 APK 了。使用 Eclipse,我完成了整个过程。但是当我到达终点时,出现异常:Proguard 返回错误代码 1。我在下面包含了整个日志。

我的 GEP 生成项目带有两个 proguard 相关文件:proguard-google-api-client.txtproguard-project.txt。还有一个名为 proguard 的项目,但它是空的。 project.properties 文件中有两行

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:proguard-google-api-client.txt
target=android-17

有人请帮忙。除了这些 proguard 错误,我的代码工作正常。我在模拟器和真实设备中进行测试。这从未停止开发中的问题。此外,我的后端已经部署在 App Engine 上,我可以毫不费力地将它与我的开发 API 一起使用。

经过一番阅读,我登陆了 How can I check/upgrade Proguard version whn using it in Eclipse for Android development? .但是在我手动将 proguard 从 4.7 更新到 4.9 之后,当我尝试导出 apk 时,我得到了 eclipse 错误,它找不到文件 android-sdk-macosx/tools/proguard/proguard-android.txt.

编辑:根据我收到的反馈,我创建了以下名为 proguard-mine.txt

的文件
-injars      bin/classes
-injars      libs
-outjars     bin/classes-processed.jar
-libraryjars /projects/tools/android-sdk-macosx/platforms/android-8/android.jar

-dontpreverify
-repackageclasses ''
-allowaccessmodification
-optimizations !code/simplification/arithmetic
-keepattributes *Annotation*

-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.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*(...);
}

-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.content.Context {
   public void *(android.view.View);
   public void *(android.view.MenuItem);
}

-keepclassmembers class * implements android.os.Parcelable {
    static android.os.Parcelable$Creator CREATOR;
}

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

# -dontwarn android.support.**

# -dontwarn com.google.android.gms.**

# -dontwarn com.google.common.cache.**

# -dontwarn com.google.common.primitives.**

# -dontwarn org.apache.commons.logging.impl.AvalonLogger.**

# -dontwarn org.apache.commons.logging.impl.Log4JLogger.**

# -dontwarn org.apache.commons.logging.impl.LogKitLogger.**

# -dontwarn org.apache.commons.logging.impl.ServletContextCleaner.**

# -dontwarn org.apache.http.impl.auth.GGSSchemeBase.**

# -dontwarn org.apache.http.impl.auth.KerberosScheme.**

# -dontwarn org.apache.http.impl.auth.NegotiateScheme.**

# -dontwarn org.apache.http.impl.auth.SPNegoScheme.**

# -dontwarn org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage.**

# -dontwarn org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage.**

然后将 project.properties 编辑为

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:proguard-google-api-client.txt:proguard-mine.txt

但是运行之后,还是报错。有人会给我提示我的文件丢失了什么吗?如果我也删除 #,我会收到错误消息。

错误日志:

[2013-05-01 14:22:25 - FriendsGame] Proguard returned with error code 1. See console
[2013-05-01 14:22:25 - FriendsGame] Note: there were 365 duplicate class definitions.
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find superclass or interface javax.servlet.ServletContextListener
[2013-05-01 14:22:25 - FriendsGame] Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class com.google.android.gms.R
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class com.google.android.gms.R$string
…
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.SignInButton: can't find referenced class com.google.android.gms.R
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.SignInButton: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.common.SignInButton: can't find referenced class com.google.android.gms.R$string
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.maps.GoogleMapOptions: can't find referenced class com.google.android.gms.R
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.maps.GoogleMapOptions: can't find referenced class com.google.android.gms.R$styleable
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.maps.GoogleMapOptions: can't find referenced class com.google.android.gms.R$styleable
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.maps.model.CameraPosition: can't find referenced class com.google.android.gms.R
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.maps.model.CameraPosition: can't find referenced class com.google.android.gms.R$styleable
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.android.gms.maps.model.CameraPosition: can't find referenced class com.google.android.gms.R$styleable
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.cache.Striped64: can't find referenced class sun.misc.Unsafe
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.cache.Striped64: can't find referenced class sun.misc.Unsafe
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.cache.Striped64$Cell: can't find referenced class sun.misc.Unsafe[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
[2013-05-01 14:22:25 - FriendsGame] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1: can't find referenced class sun.misc.Unsafe
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextListener
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSManager
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSName
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSContext
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.GGSSchemeBase: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.KerberosScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.NegotiateScheme: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.Oid
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.auth.SPNegoScheme: can't find referenced class org.ietf.jgss.GSSException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Ehcache
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage: can't find referenced class net.sf.ehcache.Element
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClient
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClient
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASResponse
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASResponse
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.MemcachedClientIF
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASResponse
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.OperationTimeoutException
[2013-05-01 14:22:25 - FriendsGame] Warning: org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage: can't find referenced class net.spy.memcached.CASValue
[2013-05-01 14:22:25 - FriendsGame]       You should check if you need to specify additional program jars.
[2013-05-01 14:22:25 - FriendsGame] Warning: there were 199 unresolved references to classes or interfaces.
[2013-05-01 14:22:25 - FriendsGame]          You may need to specify additional library jars (using '-libraryjars').
[2013-05-01 14:22:25 - FriendsGame] Warning: there were 1 instances of library classes depending on program classes.
[2013-05-01 14:22:25 - FriendsGame]          You must avoid such dependencies, since the program classes will
[2013-05-01 14:22:25 - FriendsGame]          be processed, while the library classes will remain unchanged.
[2013-05-01 14:22:25 - FriendsGame] java.io.IOException: Please correct the above warnings first.
[2013-05-01 14:22:25 - FriendsGame]     at proguard.Initializer.execute(Initializer.java:321)
[2013-05-01 14:22:25 - FriendsGame]     at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-05-01 14:22:25 - FriendsGame]     at proguard.ProGuard.execute(ProGuard.java:86)
[2013-05-01 14:22:25 - FriendsGame]     at proguard.ProGuard.main(ProGuard.java:492)

最佳答案

我已经创建了我的 proguard-project.txt

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

-libraryjars /libs/google-api-client-1.10.3-beta.jar
-libraryjars /libs/google-api-client-android2-1.10.3-beta.jar
-libraryjars /libs/google-http-client-1.10.3-beta.jar
-libraryjars /libs/google-http-client-android2-1.10.3-beta.jar
-libraryjars /libs/google-oauth-client-1.10.1-beta.jar
-libraryjars /libs/gson-2.1.jar
-libraryjars /libs/guava-11.0.1.jar
-libraryjars /libs/jackson-core-asl-1.9.4.jar
-libraryjars /libs/jsr305-1.3.9.jar
-libraryjars /libs/protobuf-java-2.2.0.jar
-libraryjars /libs/maps.jar

# Add any project specific keep options here:

-keep class com.google.**
-dontwarn com.google.**

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

用这一切检查库名

编辑project.properties

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

希望这个对你有帮助。

谢谢。

关于android - 创建版本 android apk 时出现 Proguard 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16327753/

相关文章:

swift - NSTextField 中的图像显示不正确

android - 使用最新更新构建发布 apk 时出错

macos - Postgresql 数据库在 OS X 上的位置?

java - 如何将jar文件转换成apk?

java - 错误构建 APK {重复条目 : com/google/android/gms/gcm/INetworkTaskCallback$Stub. 类}

android - 如何让 Android 在我不需要之前不回收我的位图?

Android 阻止 Gallery 读取应用程序图像

android - AsyncTask 没有零参数构造函数

android - ImageView 裁剪为多边形

macos - 为什么或者为什么我的道路没有受到 MacOSX 的尊重?