0

嗨,我是新来的,但是当我尝试将我的 android 导出到 apk 时遇到问题,我尝试多次使用 -dontwarn 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)
4

1 回答 1

0

您应该指定一个目标 SDK project.properties,在这种情况下包含“android.view.View$AccessibilityDelegate”(SDK 级别 14 或更高)。ProGuard 的收缩/优化/混淆至少需要与用于编译应用程序及其库的基本 SDK相同。支持库是针对这个更新的 SDK 编译的,所以 ProGuard 也需要它。

您仍然可以在您的AndroidManifest.xml, 中指定不同的目标/最小/最大 SDK 来运行应用程序。您当然应该确保应用程序确实与那些指定的 SDK 兼容。

于 2013-03-04T22:20:38.807 回答