好的,我正在尝试将Unity Firebase SDK版本6.4.0添加到我的统一项目中。我可以生成APK,但是每次在设备上启动该应用程序时,我只会不断遇到以下错误:
09-12 16:40:49.747 3489 3489 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/util/zzx;
09-12 16:40:49.747 3489 3489 E AndroidRuntime: at com.google.android.gms.iid.zzaf.<init>(Unknown Source)
09-12 16:40:49.747 3489 3489 E AndroidRuntime: at com.google.android.gms.iid.zzaf.<init>(Unknown Source)
09-12 16:40:49.747 3489 3489 E AndroidRuntime: at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
09-12 16:40:49.747 3489 3489 E AndroidRuntime: at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
在我的统一项目中,我使用的是Play Services Resolver版本1.2.124,并启用了使用Jetifier,我的目标API级别设置为Android 9.0(API级别28),最低API级别设置为Android 4.1(API级别) 16)并且我的build.gradle文件具有以下gms依赖项:
def PLAY_SERVICES_VERSION = "12.0.1"
implementation "com.google.android.gms:play-services-ads:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-gcm:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-analytics:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-analytics-impl:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-analytics-impl-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-analytics-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-auth:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-auth-api-phone:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-auth-api-phone-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-auth-base:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-auth-base-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-base:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-base-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-basement:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-basement-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-drive:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-drive-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-games:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-games-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-gcm:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-gcm-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-iid:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-iid-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-nearby:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-nearby-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-tagmanager-v4-impl:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-tagmanager-v4-impl-license:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-tasks:${PLAY_SERVICES_VERSION}"
implementation "com.google.android.gms:play-services-tasks-license:${PLAY_SERVICES_VERSION}"
我不确定该如何解决此依赖性。有任何想法吗?谢谢!!!