gpt4 book ai didi

android - Proguard:IllegalArgumentException:值不是引用值

转载 作者:行者123 更新时间:2023-11-29 02:13:04 26 4
gpt4 key购买 nike

我在尝试制作我的 Android 应用程序的 Proguard 版本时遇到错误。我无法用谷歌搜索。

错误是:

Unexpected error while performing partial evaluation:
Class = [com/skyhookwireless/_sdkkc]
Method = [<clinit>()V]
Exception = [java.lang.IllegalArgumentException] (Stacks have different current sizes [4] and [1])
Unexpected error while shrinking instructions after partial evaluation:
Class = [com/skyhookwireless/_sdkkc]
Method = [<clinit>()V]
Exception = [java.lang.IllegalArgumentException] (Stacks have different current sizes [4] and [1])
Not optimizing this method
Unexpected error while evaluating instruction:
Class = [com/skyhookwireless/_sdklb]
Method = [<clinit>()V]
Instruction = [112] ret v0
Exception = [java.lang.NullPointerException] (null)
Unexpected error while performing partial evaluation:
Class = [com/skyhookwireless/_sdklb]
Method = [<clinit>()V]
Exception = [java.lang.NullPointerException] (null)
Unexpected error while shrinking instructions after partial evaluation:
Class = [com/skyhookwireless/_sdklb]
Method = [<clinit>()V]
Exception = [java.lang.NullPointerException] (null)
Not optimizing this method
Unexpected error while performing partial evaluation:
Class = [com/skyhookwireless/_sdklc]
Method = [_sdka()Z]
Exception = [java.lang.ArrayIndexOutOfBoundsException] (17)
Unexpected error while shrinking instructions after partial evaluation:
Class = [com/skyhookwireless/_sdklc]
Method = [_sdka()Z]
Exception = [java.lang.ArrayIndexOutOfBoundsException] (17)
Not optimizing this method
Unexpected error while evaluating instruction:
Class = [com/skyhookwireless/wps/_sdktb]
Method = [<clinit>()V]
Instruction = [12] aastore
Exception = [java.lang.IllegalArgumentException] (Value is not a reference value [proguard.evaluation.value.UnknownIntegerValue])
Unexpected error while performing partial evaluation:
Class = [com/skyhookwireless/wps/_sdktb]
Method = [<clinit>()V]
Exception = [java.lang.IllegalArgumentException] (Value is not a reference value [proguard.evaluation.value.UnknownIntegerValue])
java.lang.IllegalArgumentException: Value is not a reference value [proguard.evaluation.value.UnknownIntegerValue]
at proguard.evaluation.value.Value.referenceValue(Value.java:97)
at proguard.evaluation.Stack.apop(Stack.java:331)
at proguard.evaluation.Processor.visitSimpleInstruction(Processor.java:181)
at proguard.classfile.instruction.SimpleInstruction.accept(SimpleInstruction.java:218)
at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:729)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:575)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:533)
at proguard.optimize.evaluation.PartialEvaluator.evaluateSubroutine(PartialEvaluator.java:907)
at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:849)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:560)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:533)
at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute0(PartialEvaluator.java:221)
at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute(PartialEvaluator.java:180)
at proguard.optimize.evaluation.LivenessAnalyzer.visitCodeAttribute(LivenessAnalyzer.java:195)
at proguard.optimize.evaluation.VariableOptimizer.visitCodeAttribute(VariableOptimizer.java:102)
at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79)
at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95)
at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod(SimplifiedVisitor.java:91)
at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71)
at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:439)
at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass(AllMethodVisitor.java:47)
at proguard.classfile.ProgramClass.accept(ProgramClass.java:281)
at proguard.classfile.ClassPool.classesAccept(ClassPool.java:114)
at proguard.optimize.Optimizer.execute(Optimizer.java:764)
at proguard.ProGuard.optimize(ProGuard.java:325)
at proguard.ProGuard.execute(ProGuard.java:114)
at proguard.ProGuard.main(ProGuard.java:499)

我将 wpsapi.jar 作为 [Project]/libs/中的外部 jar 导入到我的项目中

这里是proguard.cfg

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-dontnote
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
native <methods>;
}

-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}

最佳答案

我不知道这个问题的确切原因,但我在使用Proguard时遇到了一些奇怪的问题。我切换到最新的 Proguard 版本,它解决了我所有的问题。要更改 Proguard 版本,您需要将/tools/proguard 文件夹替换为较新的 Proguard 版本。

关于android - Proguard:IllegalArgumentException:值不是引用值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6120267/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com