签署Android应用程序时出错Proguard

时间:2015-01-28 05:11:44

标签: java android eclipse sqlite proguard

我尝试使用Proguard签署我的Android应用程序但是有这样的错误

[2015-01-28 12:04:22 - PriestsNDevils-android] Proguard returned with error code 1. See console  
[2015-01-28 12:04:22 - PriestsNDevils-android] Warning: com.badlogic.gdx.sqlite.android.AndroidCursor: can't find referenced method 'void log(java.lang.String,java.lang.String,java.lang.Exception)' in class com.badlogic.gdx.Application
[2015-01-28 12:04:22 - PriestsNDevils-android]       You should check if you need to specify additional program jars.
[2015-01-28 12:04:22 - PriestsNDevils-android] Warning: there were 1 unresolved references to program class members.
[2015-01-28 12:04:22 - PriestsNDevils-android]          Your input classes appear to be inconsistent.
[2015-01-28 12:04:22 - PriestsNDevils-android]          You may need to recompile them and try again.
[2015-01-28 12:04:22 - PriestsNDevils-android]          Alternatively, you may have to specify the option 
[2015-01-28 12:04:22 - PriestsNDevils-android]          '-dontskipnonpubliclibraryclassmembers'.
[2015-01-28 12:04:22 - PriestsNDevils-android] java.io.IOException: Please correct the above warnings first.
[2015-01-28 12:04:22 - PriestsNDevils-android]  at proguard.Initializer.execute(Initializer.java:321)
[2015-01-28 12:04:22 - PriestsNDevils-android]  at proguard.ProGuard.initialize(ProGuard.java:211)
[2015-01-28 12:04:22 - PriestsNDevils-android]  at proguard.ProGuard.execute(ProGuard.java:86)
[2015-01-28 12:04:22 - PriestsNDevils-android]  at proguard.ProGuard.main(ProGuard.java:492)

我该怎么办?。

project.properties

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

我添加了proguard-android.txt

-dontwarn com.badlogic.gdx.sqlite.android.AndroidCursor.**
-dontwarn **CompatHoneycomb -keep public class * extends android.support.v4.app.Fragment
-dontwarn javax.jdo.** -dontwarn com.google.api.client.googleapis.extensions.android.gms.**

2 个答案:

答案 0 :(得分:0)

将以下行添加到proguard-android.txt
-dontwarn com.badlogic.gdx.sqlite.android.AndroidCursor.**

答案 1 :(得分:0)

尝试在proguard .cfg文件的末尾添加这些行

-dontwarn ** CompatHoneycomb -keep public class * extends android.support.v4.app.Fragment

-dontwarn javax.jdo。** -dontwarn com.google.api.client.googleapis.extensions.android.gms。**