Android Ошибка повторяющегося класса зависимости Gradle - PullRequest
0 голосов
/ 19 марта 2020

После установки Square Reader SDK в мое приложение я сталкиваюсь с дублирующимися ошибками классов между некоторыми зависимостями Gradle, как показано ниже.

  • Мои зависимости модуля приложения:
dependencies {
  def readerSdkVersion = "1.3.5"
  implementation "com.squareup.sdk.reader:reader-sdk-$SQUARE_READER_SDK_APPLICATION_ID:$readerSdkVersion"
  runtimeOnly ("com.squareup.sdk.reader:reader-sdk-internals:$readerSdkVersion") {
    exclude group: 'com.squareup.phrase', module: 'phrase'
  }
  implementation 'com.squareup.phrase:phrase:1.1.0'

  implementation 'androidx.appcompat:appcompat:1.0.2'
  implementation 'androidx.multidex:multidex:2.0.1'
}
  • ... и сбой сборки, который я получаю, хотя я пытался исключить конфликтующую группу / модуль из Зависимости фразы Phra :
Duplicate class com.squareup.phrase.BuildConfig found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.ListPhrase found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.ListPhrase$1 found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.ListPhrase$Formatter found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.Phrase found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.Phrase$KeyToken found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.Phrase$LeftCurlyBracketToken found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.Phrase$TextToken found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)
Duplicate class com.squareup.phrase.Phrase$Token found in modules jetified-phrase-1.1.0.jar (com.squareup.phrase:phrase:1.1.0) and reader-sdk-internals-1.3.5.jar (com.squareup.sdk.reader:reader-sdk-internals:1.3.5)

Я что-то здесь упускаю? И да, у меня есть все другие конфигурации Gradle (т.е. набор параметров multidex и compile), как упомянуто в документации SDK, упомянутой ранее.

...