Ошибка отложенного компонента Flutter при добавлении com.google.android.play:core:1.8.0: сбой com.android.build.gradle.iAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Ошибка отложенного компонента Flutter при добавлении com.google.android.play:core:1.8.0: сбой com.android.build.gradle.i

Сообщение Anonymous »

Я пытаюсь добавить отложенные компоненты в свои проекты Flutter, следуя этому документу здесь.
Первое упоминание о добавлении этой реализации зависимости "com.google.android.play:core:1.8" .0" в моем файле android/app/build.gradle. Я получаю ошибки при запуске флаттера, где упоминаются повторяющиеся классы.
Это мой раздел зависимостей в файле build.gradle

Код: Выделить всё

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':unityLibrary')
implementation 'com.google.android.play:core:1.8.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-messaging:23.3.1'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.facebook.android:facebook-android-sdk:[8,9)'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation(name: "paynimo_v4.5.7_live", ext: 'jar')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation(name: "audience_sdk-release", ext: 'aar')
implementation "me.leolin:ShortcutBadger:1.1.22@aar"
implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0'
implementation 'com.google.firebase:firebase-crashlytics:18.6.0'
implementation 'com.amazon.android.amazonpay:apay-hardened-android-sdk-sso:1.1.13'
}
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.gms.google-services'

configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-auth:20.7.0'
}
}
А это ошибки

Код: Выделить всё

> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
>  Duplicate class com.google.android.play.core.appupdate.AppUpdateInfo found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.appupdate.AppUpdateManager found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.appupdate.AppUpdateManagerFactory found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.appupdate.AppUpdateOptions found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.appupdate.AppUpdateOptions$Builder found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.appupdate.testing.FakeAppUpdateManager found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
Duplicate class com.google.android.play.core.install.InstallException found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.InstallState found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.InstallStateUpdatedListener found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.NativeInstallStateUpdateListener found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.model.ActivityResult found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.model.AppUpdateType found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.model.InstallErrorCode found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.model.InstallStatus found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.install.model.UpdateAvailability found in modules jetified-app-update-2.1.0-runtime (com.google.android.play:app-update:2.1.0) and jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)
Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.3-runtime (com.google.android.play:core-common:2.0.3)
Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0)  and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
В моем pubspec.yaml я также использую эти 2 пакета:

Код: Выделить всё

  in_app_update:
git:
url: https://github.com/rajatjg/flutter_in_app_update
ref: v1.0.0
in_app_review: "^2.0.6"
Чего мне не хватает?
Моя конечная цель — настроить конфигурацию для использования отложенных компонентов в моем проекте

Подробнее здесь: https://stackoverflow.com/questions/787 ... ore1-8-0-f
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»