Gradle - Android - 在 App Review 中导致编译错误 - 放大旧依赖

Gradle - Android - In App Review causes compile error - Amplify old dependency

我正在尝试集成 In App Review,但出现此编译错误:

Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.9.1-runtime (com.google.android.play:core:1.9.1) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)

Go to the documentation to learn how to Fix dependency resolution errors.

编辑:我运行命令:./gradlew app:dependencies >> deps.txt 发现冲突是由Amplify core引起的。由于某种原因,它依赖于 androidx.navigation:navigation-dynamic-features-fragment:2.3.4,并且里面有 com.google.android.play:core:1.9.1

如何防止 Amplify 导致此问题?如何解决这个冲突?

Here is the dependency tree

我可以通过更改 gradle 文件来解决这个问题:

 // gradle imports from Amplify docs below.
implementation('com.amplifyframework:aws-storage-s3:1.35.4') {
    exclude group: 'com.google.android.play', module: 'core'
}

implementation('com.amplifyframework:aws-auth-cognito:1.35.4') {
    exclude group: 'com.google.android.play', module: 'core'
}
// Amplify core dependency
implementation('com.amplifyframework:core:1.35.4') {
    exclude group: 'com.google.android.play', module: 'core'
}