Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kotlin] duplicate class error: Duplicate com.google.protobuf classes when used with Firebase libraries #101

Open
Czeach opened this issue May 11, 2024 · 0 comments

Comments

@Czeach
Copy link

Czeach commented May 11, 2024

I am encountering a duplicate class error for com.google.protobuf classes when using the TomTom Maps or Navigation library and Firebase libraries in my Android project. This occurs because both the TomTom library and the Firebase library seem to include their own version of Protobuf.

Android Studio Jellyfish | 2023.3.1

kotlin version: 1.8.21

dependency versions being used:

    dependencies {
        // TomTom Map Display
        implementation 'com.tomtom.sdk.maps:map-display:1.2.0'
    
        // Firebase
        implementation platform('com.google.firebase:firebase-bom:33.0.0')
        implementation 'com.google.firebase:firebase-firestore'
    
    }

Current fix:
I'm currently avoiding the error by excluding the libraries causing the duplication in configurations block and the project. I'm not sure that's a good fix but the project works fine with it.

configurations {
        implementation.exclude module:'protobuf-java'
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant