【发布时间】:2018-05-29 11:23:31
【问题描述】:
我未能创建发布版本。突然 Android Studio 开始抛出以下错误。
Unexpected error while performing partial evaluation:
Class = [com/google/android/gms/d/lc]
Method = [a(Lcom/google/android/gms/d/kk;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/android/gms/d/lh;Lcom/google/android/gms/d/en;Lcom/google/android/gms/d/lb;)Lcom/google/android/gms/d/kn;]
Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [com/google/android/gms/d/kn] (with 1 known super classes) and [java/lang/String] (with 2 known super classes))
Unexpected error while preverifying:
Class = [com/google/android/gms/d/lc]
Method = [a(Lcom/google/android/gms/d/kk;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/google/android/gms/d/lh;Lcom/google/android/gms/d/en;Lcom/google/android/gms/d/lb;)Lcom/google/android/gms/d/kn;]
Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [com/google/android/gms/d/kn] (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/d/kn] (with 1 known super classes) and [java/lang/String] (with 2 known super classes)
这是我的 Proguard 配置
-keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**
-keep class com.facebook.ads.** { *; }
这是我项目的 gradle 依赖列表
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.firebase:firebase-perf:16.0.0'
implementation 'com.google.firebase:firebase-config:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.0'
implementation 'com.google.android.gms:play-services-drive:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.startapp:inapp-sdk:3.8.4'
implementation 'com.facebook.android:audience-network-sdk:4.28.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.7.1'
testImplementation 'org.powermock:powermock-mockito-release-full:1.4.9'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true
}
}
注意评论 Facebook 受众网络依赖项可修复该错误。不幸的是,我不能从项目中永久地做到这一点。
请帮助我确定问题的原因。提前致谢。
【问题讨论】:
-
我在更新工作室后也遇到了同样的问题,如果您找到了解决方案,请告诉我。
-
@SilvansSolanki,我已经发布了我的解决方法。请检查它是否对您有帮助。
标签: android proguard android-proguard facebook-audience-network