嗨,我是新来的,但我有一个问题,当我尝试导出我的android到apk我尝试了很多次- dontwwarn android.support。* *,图书馆等。
[2013-03-01 21:08:42 - CaptureActivity] Proguard returned with error code 1. See console
[2013-03-01 21:08:42 - CaptureActivity] Unexpected error while evaluating instruction:
[2013-03-01 21:08:42 - CaptureActivity] Class = [android/support/v4/view/AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl]
[2013-03-01 21:08:42 - CaptureActivity] Method = [newAccessiblityDelegateBridge(Landroid/support/v4/view/AccessibilityDelegateCompat;)Ljava/lang/Object;]
[2013-03-01 21:08:42 - CaptureActivity] Instruction = [18] areturn
[2013-03-01 21:08:42 - CaptureActivity] Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [android/support/v4/view/AccessibilityDelegateCompatIcs$1] (not even immediate super class [android/view/View$AccessibilityDelegate]))
[2013-03-01 21:08:42 - CaptureActivity] Unexpected error while performing partial evaluation:
[2013-03-01 21:08:42 - CaptureActivity] Class = [android/support/v4/view/AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl]
[2013-03-01 21:08:42 - CaptureActivity] Method = [newAccessiblityDelegateBridge(Landroid/support/v4/view/AccessibilityDelegateCompat;)Ljava/lang/Object;]
[2013-03-01 21:08:42 - CaptureActivity] Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [android/support/v4/view/AccessibilityDelegateCompatIcs$1] (not even immediate super class [android/view/View$AccessibilityDelegate]))
[2013-03-01 21:08:42 - CaptureActivity] java.lang.IllegalArgumentException: Can't find any super classes of [android/support/v4/view/AccessibilityDelegateCompatIcs$1] (not even immediate super class [android/view/View$AccessibilityDelegate])
[2013-03-01 21:08:42 - CaptureActivity] at proguard.evaluation.value.ReferenceValue.generalize(ReferenceValue.java:287)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.evaluation.value.IdentifiedReferenceValue.generalize(IdentifiedReferenceValue.java:65)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.evaluation.value.ReferenceValue.generalize(ReferenceValue.java:481)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.info.MethodOptimizationInfo.generalizeReturnValue(MethodOptimizationInfo.java:247)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.evaluation.StoringInvocationUnit.generalizeMethodReturnValue(StoringInvocationUnit.java:195)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.evaluation.StoringInvocationUnit.setMethodReturnValue(StoringInvocationUnit.java:126)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.evaluation.BasicInvocationUnit.exitMethod(BasicInvocationUnit.java:134)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.evaluation.Processor.visitSimpleInstruction(Processor.java:514)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.instruction.SimpleInstruction.accept(SimpleInstruction.java:218)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:753)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:587)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:560)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute0(PartialEvaluator.java:264)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute(PartialEvaluator.java:181)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod(SimplifiedVisitor.java:91)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:504)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass(AllMethodVisitor.java:47)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.classfile.ClassPool.classesAccept(ClassPool.java:116)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.optimize.Optimizer.execute(Optimizer.java:372)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.ProGuard.optimize(ProGuard.java:306)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.ProGuard.execute(ProGuard.java:115)
[2013-03-01 21:08:42 - CaptureActivity] at proguard.ProGuard.main(ProGuard.java:492)
您应该在您的project.properties
中指定一个目标SDK,在这种情况下包含'android.view '。查看$AccessibilityDelegate (SDK级别14或更高)。ProGuard的收缩/优化/混淆至少需要与用于编译应用程序和其库的相同的基本SDK。这个支持库是针对这个最新的SDK编译的,所以ProGuard也需要它。
您仍然可以在AndroidManifest.xml
中指定不同的目标/min/max SDK,用于运行应用程序。当然,您应该确保应用程序确实与这些指定的sdk兼容。