APP发布的Proguard错误 - android/arch/core/internal/SafeIterableMap
优化应用程序后,Proguard失败,显示此消息。APP发布的Proguard错误 - android/arch/core/internal/SafeIterableMap
compileSdkVersion = 27
buildToolsVersion = “27.0.3”
的minSdkVersion = 16
targetSdkVersion = 27
Shrinking... Removing unused program classes and class elements... Original number of program classes: 6833 Final number of program classes: 6348 Optimizing... Unexpected error while computing stack sizes: Class = [android/arch/core/internal/SafeIterableMap$1] Method = [zzf(Ljava/lang/String;)J] Exception = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [24] invokestatiC#4625 in [android/arch/core/internal/SafeIterableMap$1.zzf(Ljava/lang/String;)J]) Warning: Exception while processing task java.io.IOException: java.lang.IllegalArgumentException: Stack size becomes negative after instruction [24] invokestatiC#4625 in [android/arch/core/internal/SafeIterableMap$1.zzf(Ljava/lang/String;)J] Thread(Tasks limiter_5): destruction :app:transformClassesAndResourcesWithProguardForRelease FAILED
回答:
在我的情况我通过注释这些固定这proguard文件中的行:
#-assumenosideeffects class android.util.Log { # public static *** d(...);
# public static *** v(...);
# public static *** i(...);
# public static *** w(...);
# public static *** e(...);
我结束了对每个日志使用if(BuildConfig.DEBUG)
以上是 APP发布的Proguard错误 - android/arch/core/internal/SafeIterableMap 的全部内容, 来源链接: utcz.com/qa/267011.html