When we use a third-party library in our project , this third-party library may have used an old dependencies in its project, that can cause errors or bugs in our project. How can we force that third-party library to use an updated version of the dependency that does not conflict with our dependencies?
CodePudding user response:
If you are using an .AAR file then connect to the concern developer to replace the dependencies with newer one.
CodePudding user response:
You can exclude a module from a third-party library and include a newer version of the same to use in the project.
Use exclude
to remove the module included with the library.
dependencies {
implementation 'com.google.firebase:firebase-inappmessaging-display-ktx:20.1.0', {
exclude group: 'io.grpc', module: 'grpc-okhttp' // removing grpc-okhttp included with the library
}
implementation 'io.grpc:grpc-okhttp:1.40.1'
}