Open tuyen-vuduc opened 2 months ago
Here is the Binlog
You can check out the generated CSPROJ file(s) by opening binding.g.sln
.
Facing the issue also with my other lib :( . Really annoying.
I'm trying to repo this but the branch feat/com.stripe--stripe-android---20.40.4
does not exist?
So I used the 20.43.0 branch, and that fails with a Nuget error.
I need a reliable repo in order to investigate this further.
@dellis1972 Can you simply check out the Mapbox for Maui repo linked above. The same issue there.
This repo is easier as no special config is required. Plz try it out. https://github.com/tuyen-vuduc/dotnet-shakebugs-maui
Still no joy. That repo fails with error XACDJ7028: System.IO.FileNotFoundException: Could not find file `.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.24/3f6b4bd4f8dbe8d4bea06d107a3826469b85c3e9/slf4j-api-1.7.24.jar`.
@dellis1972 Sorry for that inconvenience. I haven't found when it occurs yet, but can you pull the latest and try again?
If the issue occurs again, plz try adding it as a direct dependency then.
<PackageReference Include="Org.Slf4j.Slf4jApi" Version="1.7.36" />
Nope, even with the additional package reference it still fails with the same error about slf4j-api-1.7.36.jar in the gradle cache.
@dellis1972 Can you share your system info? And can you try to rebuild? It's a bit weird... :( .
Its from the clean build. I'm on a Macbook Pro , I wont share any more info than that as its a MS machine.
@dellis1972 That's OK. My friend also tried my ShakeBugs sample app. It just works on his MacMini M1 :D . Can you pull latest and try again?
My tries on Windows, VS2022 have no success :(
@dellis1972 I think issue with ShakeBugs libraries is totally different. I will log another issue for that one. I found a workaround for it.
Can you try again the issue with Stripe libraries? The latest branch is changed to Stripe 20.43.0 now.
@dellis1972
I found a workaround 1/ Run the script for the desired library 2/ If there is an error, create binding libraries for dependencies one by one until done
BTW the new branch for Stripe Android binding is now for v20.46.0.
:D .
Glad you found a work around.
I still get errors on the 20.46.0 branch
src/android/com.stripe/paymentsheet/binding/Com.Stripe.Paymentsheet.csproj : error NU1107: Version conflict detected for Xamarin.AndroidX.Activity. Install/reference Xamarin.AndroidX.Activity 1.9.0.3 directly to project Com.Stripe.Paymentsheet to resolve this issue.
src/android/com.stripe/paymentsheet/binding/Com.Stripe.Paymentsheet.csproj : error NU1107: Com.Stripe.Paymentsheet -> Xamarin.AndroidX.AppCompat 1.6.1.10 -> Xamarin.AndroidX.Activity (>= 1.9.0.3)
src/android/com.stripe/paymentsheet/binding/Com.Stripe.Paymentsheet.csproj : error NU1107: Com.Stripe.Paymentsheet -> Xamarin.AndroidX.Activity.Ktx 1.8.2.1 -> Xamarin.AndroidX.Activity (>= 1.8.2.1 && < 1.8.3).
So I have still not been able to repo your original issue yet.
Can you give more info of what command you triggered?
FYI: It looks like we now cannot create a binding library along with its dependencies all at once. Under my check, if A depends on B, I have to create nuget package for B first, then create package for A. Otherwise, this error will be shown. 😢 . In the other words, A binding library project cannot refer to another binding library project. It's really sucked.
Regarding your faced error, it is due to the way Nuget Manager resolves the dependencies. It doesn't implicitly choose the highest version among the conflicting versions of a dependency, but throwing the error. I am wondering if we have an option to force Nuget Manager to choose the highest version?
I already included a workaround with this kind of file, x.y.z.fixed.json
. In this JSON, i will put the desired version of the dependency, then the error will be fixed. You can refer many other *.fixed.json
in the source code.
I can cloning the repo and running sh bind.sh --artifact com.stripe:stripe-android:20.46.0
.
I have comment out the workload installation in bind.sh
as it need root privilages and manually installed the required workloads.
Android application type
.NET Android (net7.0-android, net8.0-android, etc.)
Affected platform version
VS2022 17.9.6, .NET 8.0.204
Description
I cannot compile my binding library for this only native library
com.stripe:stripe-android:20.40.4
. All of its dependencies were bound well, but it isn't.The source code can be found here.
Steps to Reproduce
feat/com.stripe--stripe-android---20.40.4
sh bind.sh --artifact com.stripe:stripe-android:20.40.4
in the terminal (git bash)Did you find any workaround?
No. not yet.
Relevant log output