Сообщение об ошибке:< /strong>
Код: Выделить всё
Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.AbstractParser found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.ByteString found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.ByteString$1 found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.ByteString$ByteIterator found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Duplicate class com.google.protobuf.ByteString$CodedBuilder found in modules jetified-protobuf-java-2.5.0 (com.google.protobuf:protobuf-java:2.5.0) and jetified-protobuf-javalite-3.22.3 (com.google.protobuf:protobuf-javalite:3.22.3)
Код: Выделить всё
implementation("com.google.firebase:firebase-inappmessaging-display:21.0.0")
- Я попробовал исключить классы protobuf в мой файл Gradle:
Код: Выделить всё
implementation("com.google.firebase:firebase-inappmessaging-display:21.0.0") {
exclude group: 'com.google.protobuf'
}
- Для этого также попробовал старую версию.
- Я включил спецификацию Firebase (BOM) ) для автоматического управления версиями:
Код: Выделить всё
implementation platform('com.google.firebase:firebase-bom:xx.x.x')
implementation 'com.google.firebase:firebase-inappmessaging-display'
Код: Выделить всё
dependencies {
classpath 'com.android.tools.build:gradle:8.0.2'
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.google.firebase:perf-plugin:1.3.4' // Performance Monitoring plugin
}
dependencies {
implementation('com.google.firebase:firebase-messaging:22.0.0') {
exclude group: 'com.google.firebase', module: 'firebase-analytics'
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
}
implementation 'com.google.firebase:firebase-analytics:20.1.2'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-core:20.1.2'
implementation 'com.google.firebase:firebase-crashlytics:18.2.1'
implementation 'com.google.firebase:firebase-iid:21.1.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.6'
implementation 'com.google.firebase:firebase-perf:19.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
implementation 'com.google.firebase:firebase-appcheck-playintegrity:17.0.1'
}
Как решить проблему дублирования классов, вызванную protobuf при добавлении обмена сообщениями внутри приложения Firebase в мой проект? Существует ли конкретная техника управления конфигурацией или версиями, которой мне следует следовать?
Заранее благодарим вас за помощь!
Подробнее здесь: https://stackoverflow.com/questions/784 ... e-in-app-m