Proguard - Proguard返回错误代码1

时间:2014-12-07 18:07:22

标签: android proguard

最近集成的Pushwoosh库到我的Android应用程序。它工作正常。但在导出为签名应用程序时面临跟随错误。请帮忙。提前谢谢。

 Proguard returned with error code 1. See console
 Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find superclass or interface com.amazon.device.messaging.ADMMessageHandlerBase
 Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced method 'android.content.Context getApplicationContext()' in class com.arellomobile.android.push.PushAmazonIntentService
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
 Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
       You should check if you need to specify additional program jars.
 Warning: there were 17 unresolved references to classes or interfaces.
          You may need to specify additional library jars (using '-libraryjars').
 Warning: there were 1 unresolved references to program class members.
          Your input classes appear to be inconsistent.
          You may need to recompile them and try again.
          Alternatively, you may have to specify the option 
          '-dontskipnonpubliclibraryclassmembers'.
 java.io.IOException: Please correct the above warnings first.
    at proguard.Initializer.execute(Initializer.java:321)
    at proguard.ProGuard.initialize(ProGuard.java:211)
    at proguard.ProGuard.execute(ProGuard.java:86)
    at proguard.ProGuard.main(ProGuard.java:492)
 Proguard returned with error code 1. See console
 proguard.ParseException: Expecting opening '{' at 'public' in line 22 of file 'D:\Android-pjt-build\Dec14\test\proguard-project.txt',
   included from argument number 4
    at proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:678)
    at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:490)
    at proguard.ConfigurationParser.parse(ConfigurationParser.java:139)
    at proguard.ProGuard.main(ProGuard.java:484)
testProguard returned with error code 1. See console
testproguard.ParseException: Unknown option '-dontskipnonpubliclibraryclassmembers.**' in line 24 of file 'D:\Android-pjt-build\Dec14\test\proguard-project.txt',
test  included from argument number 4
test    at proguard.ConfigurationParser.parse(ConfigurationParser.java:191)
test    at proguard.ProGuard.main(ProGuard.java:484)
 Proguard returned with error code 1. See console
 Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find superclass or interface com.amazon.device.messaging.ADMMessageHandlerBase
 Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced method 'android.content.Context getApplicationContext()' in class com.arellomobile.android.push.PushAmazonIntentService
 Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
 Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
 Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
       You should check if you need to specify additional program jars.
 Warning: there were 17 unresolved references to classes or interfaces.
          You may need to specify additional library jars (using '-libraryjars').
 Warning: there were 1 unresolved references to program class members.
          Your input classes appear to be inconsistent.
          You may need to recompile them and try again.
          Alternatively, you may have to specify the option 
          '-dontskipnonpubliclibraryclassmembers'.
 java.io.IOException: Please correct the above warnings first.
    at proguard.Initializer.execute(Initializer.java:321)
    at proguard.ProGuard.initialize(ProGuard.java:211)
    at proguard.ProGuard.execute(ProGuard.java:86)
    at proguard.ProGuard.main(ProGuard.java:492)

3 个答案:

答案 0 :(得分:1)

不要混淆Pushwoosh类,以及com.arellomobile.android。*

答案 1 :(得分:1)

将此行放在proguard文件的最后一行

-dontwarn com.amazon.**

答案 2 :(得分:1)

通过在project.txt

中添加此行来解决
-dontwarn com.arellomobile.android.push.**