解析时出现proguard错误

时间:2014-08-28 21:25:46

标签: android parse-platform proguard

当我使用Proguard和Parse Push时,我收到以下错误:

  

[2014-08-28 14:09:35 - PicturePlay] Proguard返回错误代码1.请参阅控制台   [2014-08-28 14:09:35 - PicturePlay] proguard.ParseException:期待关键字' class',>' interface',或者' enum'之前' -include'在参数5中   [2014-08-28 14:09:35 - PicturePlay]
    在proguard.ConfigurationParser.readNextWord(ConfigurationParser.java:1133)   [2014-08-28 14:09:35 - PicturePlay]
    在proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:514)   [2014-08-28 14:09:35 - PicturePlay]
    在proguard.ConfigurationParser.parse(ConfigurationParser.java:151)   [2014-08-28 14:09:35 - PicturePlay]
    在proguard.ProGuard.main(ProGuard.java:484)

我在proguard-properties.txt中使用的Proguard配置是:

  

-dontwarn com.parse。**

     

-keep class com.parse。** {*; }

     

-libraryjars \ libs \ Parse-1.5.0.jar

     

-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.preference.Preference

     

-keep public class com.android.vending.billing.IInAppBillingService

     

-keep public class * extends android.view.View {      public(android.content.Context);      public(android.content.Context,android.util.AttributeSet);      public(android.content.Context,android.util.AttributeSet,int);   }

     

-keepclasseswithmembers class * {      public(android.content.Context,android.util.AttributeSet);   }

     

-keepclasseswithmembers class * {      public(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 * extends android.app.Activity {     public void *(android.view.View);   }

     

-whyareyoukeeping

我需要删除Proguard中的Parse错误?

1 个答案:

答案 0 :(得分:0)

-whyareyoukeeping选项需要类规范,例如:

-whyareyoukeeping class com.example.**