AppsFlyer 与 ProGuard 一起使用时构建失败
Build fails when AppsFlyer is used with ProGuard
我正在关注 this manual 将 AppsFlyer 集成到我们的 Android 应用中。
当我尝试使用 minifyEnabled true
构建项目时,构建日志中出现以下警告:
Warning: com.appsflyer.GcmInstanceIdListener: can't find superclass or interface com.google.android.gms.iid.InstanceIDListenerService
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceID
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceID
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceID
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService
Warning: com.appsflyer.u: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService
构建失败。
这是应用程序模块的相关部分build.gradle:
dependencies {
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.appsflyer:af-android-sdk:4+@aar'
implementation 'com.android.installreferrer:installreferrer:1.0'
}
以下是 ProGuard 配置的相关部分:
-dontwarn com.android.installreferrer
请同时添加以下内容:
-dontwarn com.appsflyer.**
我正在关注 this manual 将 AppsFlyer 集成到我们的 Android 应用中。
当我尝试使用 minifyEnabled true
构建项目时,构建日志中出现以下警告:
Warning: com.appsflyer.GcmInstanceIdListener: can't find superclass or interface com.google.android.gms.iid.InstanceIDListenerService
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceID
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceID Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceID
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService
Warning: com.appsflyer.GcmInstanceIdListener: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService
Warning: com.appsflyer.u: can't find referenced class com.google.android.gms.iid.InstanceIDListenerService
构建失败。
这是应用程序模块的相关部分build.gradle:
dependencies {
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.appsflyer:af-android-sdk:4+@aar'
implementation 'com.android.installreferrer:installreferrer:1.0'
}
以下是 ProGuard 配置的相关部分:
-dontwarn com.android.installreferrer
请同时添加以下内容:
-dontwarn com.appsflyer.**