proguard IllegalArgumentException

时间:2019-05-28 10:09:17

标签: proguard minify shrink

尝试构建我的应用程序的发行版。出现错误,提示

$("#table_body tbody").append("<tr><td>" + name.Name + "</td><td>" + 
user.Email +  "</td></td></td></tr>");

我在这里看到了类似的情况: https://sourceforge.net/p/proguard/bugs/573/

我已经添加了Caused by: java.io.IOException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Value "a" is not an integer value [proguard.evaluation.value.UnknownReferenceValue] 但是错误仍然显示 没有变化。也许我在保障规则中遗漏了其他东西?

-optimizations !class/unbosing/enum

这是显示的错误


-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !class/unboxing/enum
-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.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
-keep class android.support.v4.** { *; }
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment
-keep class android.support.v8.renderscript.** { *; }
-dontwarn android.support.**
-dontobfuscate
-keep public class com.google.android.gms.** { public *; }
-dontwarn com.google.android.gms.**
-dontwarn okio.**
-dontwarn retrofit2.Platform$Java8
# Keep all things of data model classes
-keep public class com.hotmob.sdk.model.** { *; }

-keepclasseswithmembernames class * {
    native <methods>;
}

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

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

-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

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

-keepclassmembers class * extends java.lang.Enum {
    <fields>;
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

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

-keep class MyClass;

-Adagger.android.experimentalUseStringKeys

# gson
-keepattributes Signature
-keepattributes *Annotation*
-keep class sun.misc.Unsafe { *; }

# android-saripaar
-keep class com.mobsandgeeks.saripaar.** { *; }
-keep @com.mobsandgeeks.saripaar.annotation.ValidateUsing class * { *; }

# loading icon
-keep class com.wang.avi.** { *; }
-keep class com.wang.avi.indicators.** { *; }


stacktrack调试显示的内容几乎相同


Optimizing (pass 1/5)...
> Task :app:transformClassesAndResourcesWithProguardForRelease

Unexpected error while evaluating instruction:
  Class       = [kotlin/reflect/jvm/internal/impl/load/java/lazy/descriptors/LazyJavaPackageScope$classes$1]
  Method      = [invoke(Lkotlin/reflect/jvm/internal/impl/load/java/lazy/descriptors/LazyJavaPackageScope$FindClassRequest;)Lkotlin/reflect/jvm/internal/impl/descriptors/ClassDescriptor;]
  Instruction = [311] ificmpne +113 (target=424)
  Exception   = [java.lang.IllegalArgumentException] (Value "a" is not an integer value [proguard.evaluation.value.UnknownReferenceValue])
Unexpected error while performing partial evaluation:
  Class       = [kotlin/reflect/jvm/internal/impl/load/java/lazy/descriptors/LazyJavaPackageScope$classes$1]
  Method      = [invoke(Lkotlin/reflect/jvm/internal/impl/load/java/lazy/descriptors/LazyJavaPackageScope$FindClassRequest;)Lkotlin/reflect/jvm/internal/impl/descriptors/ClassDescriptor;]
  Exception   = [java.lang.IllegalArgumentException] (Value "a" is not an integer value [proguard.evaluation.value.UnknownReferenceValue])
Warning: Exception while processing task java.io.IOException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Value "a" is not an integer value [proguard.evaluation.value.UnknownReferenceValue]
Thread(Tasks limiter_2): destruction

> Task :app:transformClassesAndResourcesWithProguardForRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details

0 个答案:

没有答案