[2013-11-28 13:17:19 - Sjh_android] Proguard returned with error code 1. See console [2013-11-28 13:17:19 - Sjh_android] Note: there were 426 duplicate class definitions. [2013-11-28 13:17:19 - Sjh_android] You should check if you need to specify additional program jars. [2013-11-28 13:17:19 - Sjh_android] Unexpected error while computing stack sizes: [2013-11-28 13:17:19 - Sjh_android] Class = [cn/jpush/android/api/InstrumentedActivity] [2013-11-28 13:17:19 - Sjh_android] Method = [<clinit>()V] [2013-11-28 13:17:19 - Sjh_android] Exception = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [12] invokevirtual #57 in [cn/jpush/android/api/InstrumentedActivity.<clinit>()V]) [2013-11-28 13:17:19 - Sjh_android] Unexpected error while editing code: [2013-11-28 13:17:19 - Sjh_android] Class = [cn/jpush/android/api/InstrumentedActivity] [2013-11-28 13:17:19 - Sjh_android] Method = [<clinit>()V] [2013-11-28 13:17:19 - Sjh_android] Exception = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [12] invokevirtual #57 in [cn/jpush/android/api/InstrumentedActivity.<clinit>()V]) [2013-11-28 13:17:19 - Sjh_android] java.lang.IllegalArgumentException: Stack size becomes negative after instruction [12] invokevirtual #57 in [cn/jpush/android/api/InstrumentedActivity.<clinit>()V] [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.evaluateInstructionBlock(StackSizeComputer.java:334) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.visitBranchInstruction(StackSizeComputer.java:197) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.instruction.BranchInstruction.accept (BranchInstruction.java:140) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.evaluateInstructionBlock(StackSizeComputer.java:355) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.visitCodeAttribute0(StackSizeComputer.java:153) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.visitCodeAttribute (StackSizeComputer.java:110) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.editor.StackSizeUpdater.visitCodeAttribute (StackSizeUpdater.java:49) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.editor.CodeAttributeEditor.visitCodeAttribute0 (CodeAttributeEditor.java:376) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.editor.CodeAttributeEditor.visitCodeAttribute (CodeAttributeEditor.java:311) [2013-11-28 13:17:19 - Sjh_android] at proguard.optimize.DuplicateInitializerInvocationFixer.visitCodeAttribute (DuplicateInitializerInvocationFixer.java:92) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod (SimplifiedVisitor.java:91) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:504) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass (AllMethodVisitor.java:47) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.ProgramClass.accept(ProgramClass.java:346) [2013-11-28 13:17:19 - Sjh_android] at proguard.classfile.ClassPool.classesAccept(ClassPool.java:116) [2013-11-28 13:17:19 - Sjh_android] at proguard.optimize.Optimizer.execute(Optimizer.java:500) [2013-11-28 13:17:19 - Sjh_android] at proguard.ProGuard.optimize(ProGuard.java:306) [2013-11-28 13:17:19 - Sjh_android] at proguard.ProGuard.execute(ProGuard.java:115) [2013-11-28 13:17:19 - Sjh_android] at proguard.ProGuard.main(ProGuard.java:492) [2013-11-28 13:20:10 - Sjh_android] Proguard returned with error code 1. See console [2013-11-28 13:20:10 - Sjh_android] Note: there were 426 duplicate class definitions. [2013-11-28 13:20:10 - Sjh_android] You should check if you need to specify additional program jars. [2013-11-28 13:20:10 - Sjh_android] Unexpected error while computing stack sizes: [2013-11-28 13:20:10 - Sjh_android] Class = [cn/jpush/android/api/InstrumentedActivity] [2013-11-28 13:20:10 - Sjh_android] Method = [<clinit>()V] [2013-11-28 13:20:10 - Sjh_android] Exception = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [12] invokevirtual #57 in [cn/jpush/android/api/InstrumentedActivity.<clinit>()V]) [2013-11-28 13:20:10 - Sjh_android] Unexpected error while editing code: [2013-11-28 13:20:10 - Sjh_android] Class = [cn/jpush/android/api/InstrumentedActivity] [2013-11-28 13:20:10 - Sjh_android] Method = [<clinit>()V] [2013-11-28 13:20:10 - Sjh_android] Exception = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [12] invokevirtual #57 in [cn/jpush/android/api/InstrumentedActivity.<clinit>()V]) [2013-11-28 13:20:10 - Sjh_android] java.lang.IllegalArgumentException: Stack size becomes negative after instruction [12] invokevirtual #57 in [cn/jpush/android/api/InstrumentedActivity.<clinit>()V] [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.evaluateInstructionBlock(StackSizeComputer.java:334) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.visitBranchInstruction(StackSizeComputer.java:197) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.instruction.BranchInstruction.accept (BranchInstruction.java:140) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.evaluateInstructionBlock(StackSizeComputer.java:355) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.visitCodeAttribute0(StackSizeComputer.java:153) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.attribute.visitor.StackSizeComputer.visitCodeAttribute (StackSizeComputer.java:110) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.editor.StackSizeUpdater.visitCodeAttribute (StackSizeUpdater.java:49) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.editor.CodeAttributeEditor.visitCodeAttribute0 (CodeAttributeEditor.java:376) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.editor.CodeAttributeEditor.visitCodeAttribute (CodeAttributeEditor.java:311) [2013-11-28 13:20:10 - Sjh_android] at proguard.optimize.DuplicateInitializerInvocationFixer.visitCodeAttribute (DuplicateInitializerInvocationFixer.java:92) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod (SimplifiedVisitor.java:91) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:504) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass (AllMethodVisitor.java:47) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.ProgramClass.accept(ProgramClass.java:346) [2013-11-28 13:20:10 - Sjh_android] at proguard.classfile.ClassPool.classesAccept(ClassPool.java:116) [2013-11-28 13:20:10 - Sjh_android] at proguard.optimize.Optimizer.execute(Optimizer.java:500) [2013-11-28 13:20:10 - Sjh_android] at proguard.ProGuard.optimize(ProGuard.java:306) [2013-11-28 13:20:10 - Sjh_android] at proguard.ProGuard.execute(ProGuard.java:115) [2013-11-28 13:20:10 - Sjh_android] at proguard.ProGuard.main(ProGuard.java:492)
最近用到了一个第三方推送——极光推送,debug没问题,但是混淆代码时就报这些错,然后在极光官方找到了答案:
http://docs.jpush.cn/pages/viewpage.action?pageId=7864765#Android常见问题-如何在代码时混淆忽略jpush-sdk-releasejar?
点击打开链接
-dontwarn cn.jpush.**
-keep
class
cn.jpush.** { *; }
|
由于第三方 ROM 的管理软件需要用户手动操作
http://download.csdn.net/detail/msn465780/6625061 点击打开链接