带有 Tealium AdIdentifier 插件的 Cordova 应用程序在 Android 台设备上启动时崩溃

Cordova app with Tealium AdIdentifier Plugin crashes on startup on Android device

按照 https://docs.tealium.com/platforms/cordova/install/ and https://docs.tealium.com/platforms/cordova/module-adid/ 上的安装说明,我的应用程序在启动时崩溃。

错误信息是:

com.tealium.adidentifier.AdIdentifier.run

java.lang.ClassNotFoundException: Didn't find class 
"com.google.android.gms.ads.identifier.AdvertisingIdClient" on path: 
DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file 
"/data/app/tv.talpa.vi.nld.test-
2s3C4hjESlp1c4kXXrJEoA==/base.apk"],nativeLibraryDirectories=
[/data/app/tv.talpa.vi.nld.test-2s3C4hjESlp1c4kXXrJEoA==/lib/arm64, /system/lib64, 
/vendor/lib64]]

使用 Cordova Android 8.0.0.

知道这里出了什么问题吗?

设法通过在 Gradle 构建配置中强制添加 Google 播放服务来解决此问题:

allprojects {
  repositories {
    jcenter()
    maven { url 'https://maven.google.com' }
  }
}

buildscript {
  repositories {
    mavenCentral()
    jcenter()
  }
}
configurations.all {
  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  }

  resolutionStrategy {
    force 'com.google.android.gms:play-services-gcm:16.1.0'
  }
}

还用 Tealium 标记了这个: https://github.com/Tealium/cordova-plugin/issues/37#issuecomment-508789280