嗨,我是新来的,但是当我尝试将我的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)
答案 0 :(得分:0)
您应该在project.properties
中指定目标SDK,在这种情况下包含'android.view.View $ AccessibilityDelegate'(SDK级别14或更高级别)。 ProGuard的缩小/优化/混淆至少需要用于编译应用程序和其库的基本SDK。支持库是针对这个更新的SDK编译的,因此ProGuard也需要它。
您仍然可以在AndroidManifest.xml
中指定不同的目标/最小/最大SDK,以便运行该应用程序。您当然应该确保应用程序确实与那些指定的SDK兼容。