5

I created a brand spanking new Xamarin Android App in Visual Studio 2022.

I then referenced the v1.0.17.2 of the Xamarin.Stripe.Terminal.Android library as I need to perform some transactions on a card reader.

I compiled the solution without touching a line of code and I got the following issue

Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: C:\Users\XYZ.nuget\packages\xamarin.google.guava.listenablefuture\1.0.0.2\buildTransitive\monoandroid50\guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.class, obj\Debug\120\lp\54\jl\guava-28.1-android.jar:com/google/common/util/concurrent/ListenableFuture.class

You can see two jar references in the error message

1.0.0.2\buildTransitive\monoandroid50\guava-listenablefuture.jar

obj\Debug\120\lp\54\jl\guava-28.1-android.jar

If I take the full java command line built by Visual Studio, and I then remove the reference the jar

1.0.0.2\buildTransitive\monoandroid50\guava-listenablefuture.jar

then java compiles correctly from the command line, with a slew of warnings.


I'm just wondering if there is some way to exclude this JAR from the compile process in Visual Studio, so that the build can continue on correctly.

Any guidance would be much appreciated.

deczaloth
  • 7,094
  • 4
  • 24
  • 59
Bigtoe
  • 3,372
  • 1
  • 31
  • 47
  • 1
    Maybe this can help: https://stackoverflow.com/questions/70907093/guava-in-android-dynamic-feature-module – sgjesse Mar 10 '22 at 07:22
  • @Bigtoe did you find an answer for this? – fandro Mar 21 '22 at 12:27
  • @fandro I need to revist this, I got a notification recently that the git repo has been updated and there may be a later nuget version there. – Bigtoe Mar 23 '22 at 15:12
  • Thanks, if it's a public repo I can you share it? otherwise I m waiting for your feedback :) – fandro Mar 24 '22 at 16:03
  • Hi @fandro, the 2.5.2 branch has been merged into master, but they have not released a new version of the nuget packages after the build. https://github.com/Square-Six/Xamarin.Stripe.Terminal.Android – Bigtoe Mar 24 '22 at 19:05

0 Answers0