-
Notifications
You must be signed in to change notification settings - Fork 293
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
Fix problem with ListenableFuture conflict if other libraries use guava #136
Conversation
This does not sound like the correct solution. If your other dependency which uses So it will need to be fixed at the plugin that uses compiled dependences instead of Also, there shouldn't be Is there anything I'm missing? Otherwise I will close this PR. |
Thanks for the clarification :) I'm obviously just learning the ropes here. You can close this. |
Could you please elaborate a bit more on the issue? After a bit of detective work, I found that the conflicting package is google_sign_in. They don't use compiled guava dependency - it's just a normal dependency in build.gradle file. Yet this is a known issue with guava that they made their own listenablefuture which is in conflict with com.google.common.util.concurrent.ListenableFuture (which is in turn used by androidx work-runtime library that you use) It's a bit of a mess... After testing the solution with
I don't see any errors with google_sign_in library, therefore, I presume this excludes guava only for your library and not for the whole project. But I'm not really that familiar with gradle (who is...) and my assumptions might be wrong here. Yet the issue stands that your library does not compile with google_sign_in library which I think is worth figuring out. |
Excluding it like this in our Another thing I can point you to is using |
That makes sense. You might consider adding a note to the documentation about it. Once I added |
Hi, I put together some fixes that I needed to make this run in my project - there is an issue with using androidx.work:work-runtime which is dependant on com.google.common.util.concurrent.ListenableFuture if some of the other libraries in the project depend on com.google.guava (which also contains ListenableFuture class). This resulted in the following error:
Duplicate class com.google.common.util.concurrent.ListenableFuture found in modules guava-20.0.jar
There is also a fix of testInstrumentationRunner library in build.gradle which was not compliant with androidX
Lastly, I put in the gradle wrapper 5.4.1 but that was because android studio was annoying me to do it - Not sure if it's needed though.
I didn't manage to build your example project but all seems to be working in in mine.
Best regards