Proguard 错误:“找不到...的通用超类”
Posted
技术标签:
【中文标题】Proguard 错误:“找不到...的通用超类”【英文标题】:Proguard error: "Can't find common super class of ..." 【发布时间】:2019-05-04 01:40:05 【问题描述】:我在 android Studio 中构建应用时遇到此错误:
Unexpected error while performing partial evaluation:
Class = [com/google/android/gms/internal/zznc]
Method = [zza(Lcom/google/android/gms/internal/zzmk;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/android/gms/internal/zznh;Lcom/google/android/gms/internal/zzgl;Lcom/google/android/gms/internal/zznb;)Lcom/google/android/gms/internal/zzmn;]
Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [com/google/android/gms/internal/zzmn] (with 1 known super classes) and [java/lang/String] (with 2 known super classes))
Warning: Exception while processing task java.io.IOException: java.lang.IllegalArgumentException: Can't find common super class of [com/google/android/gms/internal/zzmn] (with 1 known super classes) and [java/lang/String] (with 2 known super classes)
:analytics_test_app:transformClassesAndResourcesWithProguardForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':analytics_test_app:transformClassesAndResourcesWithProguardForDebug'.
> Job failed, see logs for details
我该如何解决?
【问题讨论】:
【参考方案1】:您有不同版本的 Play Service 库吗?确保对所有库使用相同的版本:
implementation 'com.google.android.gms:play-services-analytics:16.0.1'
implementation 'com.google.android.gms:play-services-auth:11.8.0' // should be the same version
某些版本具有不同的实现和 API,这会导致内部冲突,也会影响 Proguard。
【讨论】:
以上是关于Proguard 错误:“找不到...的通用超类”的主要内容,如果未能解决你的问题,请参考以下文章