【问题标题】:Proguard error: "Can't find common super class of ..."Proguard 错误:“找不到...的通用超类”
【发布时间】: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

我该如何解决?

【问题讨论】:

    标签: java android google-play-services proguard


    【解决方案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。

    【讨论】:

      猜你喜欢
      • 2012-05-26
      • 1970-01-01
      • 1970-01-01
      • 2018-01-06
      • 2020-10-27
      • 2012-09-16
      • 2014-06-23
      • 1970-01-01
      • 2011-02-05
      相关资源
      最近更新 更多