这个问题已经多次被问过,但我无法解决。我正在尝试使用eclipse导出我的应用程序以进行最终发布但是我收到以下错误。我添加了其他人在其他链接中建议的所有条目但没有帮助。请帮我解决这个错误。
Proguard returned with error code 1. See console
[2014-08-24 11:21:11 - ] Note: there were 1035 duplicate class definitions.
[2014-08-24 11:21:11 - ] Warning:com.google.api.client.extensions.jdo.JdoDataStoreFactory$JdoValue: can't find superclass or interface javax.jdo.spi.PersistenceCapable
[2014-08-24 11:21:11 - ] Warning: com.google.api.client.extensions.jdo.JdoDataStoreFactory$JdoDataStore: can't find referenced class javax.jdo.PersistenceManagerFactory
[2014-08-24 11:21:11 -
[2014-08-24 11:21:11 - ] Warning: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential: can't find referenced class com.google.android.gms.common.AccountPicker
[2014-08-24 11:21:11 - ] Warning: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential: can't find referenced class com.google.android.gms.auth.GoogleAuthUtil
You should check if you need to specify additional program jars.
Warning: there were 127 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
Error: Please correct the above warnings first.
有很长的错误,所以我粘贴了相关的错误。下面是我的proguard-project.txt文件条目。
-keep class android.support.v4.** { *; }
-dontwarn android.support.v4.**
-dontwarn javax.activation.**
-dontwarn javax.security.**
-dontwarn java.awt.**
-libraryjars <java.home>/lib/rt.jar
-keep class javax.** {*;}
-keep class com.sun.** {*;}
-keep class myjava.** {*;}
-keep class org.apache.harmony.** {*;}
-keep public class Mail {*;}
-dontshrink
-dontwarn org.mockito.**
-dontwarn sun.reflect.**
-dontwarn android.test.**
-keep class javax.ws.rs.** { *; }
-dontwarn com.fasterxml.jackson.**
-dontwarn org.xmlpull.v1.**
答案 0 :(得分:7)
我解决了这个问题。我在下面添加了两行,现在它没有发出任何警告,我能够使用eclipse成功生成.apk文件。
-dontwarn javax.jdo.**
-dontwarn com.google.api.client.googleapis.extensions.android.gms.**
希望它会帮助某人。感谢