Приложение Cordova с плагином Tealium AdIdentifier вылетает при запуске на устройстве Android - PullRequest
1 голос
/ 13 мая 2019

Следуя инструкциям по установке https://docs.tealium.com/platforms/cordova/install/ и https://docs.tealium.com/platforms/cordova/module-adid/, мое приложение падает при запуске.

Сообщение об ошибке:

com.tealium.adidentifier.AdIdentifier$1.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.

Есть идеи, что здесь происходит не так?

1 Ответ

0 голосов
/ 09 июля 2019

Удалось исправить это, принудительно добавив Google Play Services в конфигурацию сборки Gradle:

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

...