Closed nlysaght closed 2 years ago
I actually have the 2.0+ bindings built. I just need to get the branch committed to master. It's built against Android 12 and should resolve some of your issues.
That would be great @chris-oswald , happy to make a contribution to the project if it would help, maybe purchase some professional services. I appreciate the time & effort that goes into these types of projects, I almost got the 2.5.2 branch working, but unfortunately just don't know enough about the Android side of things to get it over the line.
@nlysaght , I just submitted a PR on the 2.5.2 branch. You can look at the libraries I had to build for Android. I've also included my project references.
<ItemGroup>
<Reference Include="DeviceNames">
<HintPath>Libraries\DeviceNames.dll</HintPath>
</Reference>
<Reference Include="Mono.Android" />
<Reference Include="StripeTerminal.Core">
<HintPath>Libraries\StripeTerminal.Core.dll</HintPath>
</Reference>
<Reference Include="StripeTerminal.External">
<HintPath>Libraries\StripeTerminal.External.dll</HintPath>
</Reference>
<Reference Include="StripeTerminal.Internal.Common">
<HintPath>Libraries\StripeTerminal.Internal.Common.dll</HintPath>
</Reference>
<Reference Include="StripeTerminal.Internal.Models">
<HintPath>Libraries\StripeTerminal.Internal.Models.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="Xamarin.Rootbeer">
<HintPath>Libraries\Xamarin.Rootbeer.dll</HintPath>
</Reference>
<Reference Include="Xamarin.SquareUp.Moshi">
<HintPath>Libraries\Xamarin.SquareUp.Moshi.dll</HintPath>
</Reference>
<Reference Include="Xamarin.SquareUp.Wire">
<HintPath>Libraries\Xamarin.SquareUp.Wire.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="akavache">
<Version>7.3.47</Version>
</PackageReference>
<PackageReference Include="GoogleGson">
<Version>2.8.8.2</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Analytics">
<Version>4.4.0</Version>
</PackageReference>
<PackageReference Include="Naxam.Jakewharton.Timber">
<Version>4.7.1</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Connectivity">
<Version>3.2.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.ReactiveX.RxAndroid">
<Version>2.1.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.ReactiveX.RxJava">
<Version>2.2.21.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.ReactiveX.RxKotlin">
<Version>2.4.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
<Version>2.3.1.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData.Ktx">
<Version>2.3.1.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Process">
<Version>2.3.1.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Room.Runtime">
<Version>2.3.0.4</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2244" />
<PackageReference Include="Xamarin.Google.Dagger">
<Version>2.39.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Google.Guava">
<Version>29.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.JavaX.Inject">
<Version>1.0.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Kotlin.StdLib">
<Version>1.5.31.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8">
<Version>1.5.31.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.KotlinX.Coroutines.Android">
<Version>1.5.2.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.KotlinX.Coroutines.Core">
<Version>1.5.2.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.KotlinX.Coroutines.Rx2">
<Version>1.5.2.2</Version>
</PackageReference>
<PackageReference Include="ZXing.Net.Mobile">
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="ZXing.Net.Mobile.Forms">
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="Plugin.Permissions">
<Version>6.0.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
</ItemGroup>
`
Thanks so the update @chris-oswald , I'll get stuck into this shortly.
@nlysaght I'm closing unless you're still stuck
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. Compiled it without touching a line of code and I got the following issue Type com.google.common.util.concurrent.ListenableFuture is defined multiple times:
Just wondering if you would have any guidance on how to resolve this issue.
The full type error is here. Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: C:\Users..me...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 jars referenced 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 com 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.